packages feed

oeis2 1.0.8 → 1.0.9

raw patch · 3 files changed

+10/−10 lines, 3 filesdep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: containers

API changes (from Hackage documentation)

Files

oeis2.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           oeis2-version:        1.0.8+version:        1.0.9 synopsis:       Interface for Online Encyclopedia of Integer Sequences (OEIS). description:    Release notes are here https://github.com/23prime/oeis2/releases category:       Math@@ -36,7 +36,7 @@   build-depends:       aeson ==2.*     , base >=4.17 && <5-    , containers >=0.5 && <0.7+    , containers >=0.5 && <0.8     , http-conduit >=2.2 && <3     , lens >=4.15 && <6     , lens-aeson >=1.2 && <2@@ -56,7 +56,7 @@       QuickCheck     , aeson ==2.*     , base >=4.17 && <5-    , containers >=0.5 && <0.7+    , containers >=0.5 && <0.8     , hspec     , http-conduit >=2.2 && <3     , lens >=4.15 && <6
src/Math/OEIS/Internal.hs view
@@ -3,10 +3,11 @@  module Math.OEIS.Internal where -import           Control.Lens        ((^?), (^?!))+import           Control.Lens        ((^?!), (^?)) import           Control.Monad       (when)-import           Data.Aeson.Lens+import           Data.Aeson          (decodeStrict) import           Data.Aeson.Key      (fromText)+import           Data.Aeson.Lens import           Data.Aeson.Types import           Data.Char import           Data.Functor@@ -86,7 +87,7 @@ getResults ss start bound vs = do   when (bound < 0) $ fail "Upper-bound number of search results mast be non-negative."   jsn <- getJSON ss start-  let results' = jsn ^? key "results" . _Array+  let results' = decodeStrict $ T.encodeUtf8 jsn :: Maybe Array       results = case results' of         Nothing  -> return []         Just vs' ->
test/Spec.hs view
@@ -38,14 +38,14 @@     maple <$> lookupSeq (ID "A000027") `shouldBe`     Just ["A000027 := n->n; seq(A000027(n), n=1..100);"]   it "No search results" $-    lookupSeq (SubSeq [1,3,4,5,4,3,6]) `shouldBe` Nothing+    lookupSeq (SubSeq [1,3,4,5,4,3,6,10000000]) `shouldBe` Nothing  specGetSeqData :: Spec specGetSeqData = describe "Test for getSeqData" $ do   it "Get SeqData" $     getSeqData (ID "A000027")`shouldBe` Just [1..77]   it "No SeqData" $-    getSeqData (SubSeq [1,3,4,5,4,3,6]) `shouldBe` Nothing+    getSeqData (SubSeq [1,3,4,5,4,3,6,10000000]) `shouldBe` Nothing  specExtendSeq :: Spec specExtendSeq = describe "Test for extendSeq" $ do@@ -55,5 +55,4 @@         seq = extendSeq rs     in rs `isInfixOf` seq   it "No extension" $-    extendSeq [1,3,4,5,4,3,6] `shouldBe` [1,3,4,5,4,3,6]-+    extendSeq [1,3,4,5,4,3,6,10000000] `shouldBe` [1,3,4,5,4,3,6,10000000]