packages feed

oeis2 1.0.7 → 1.0.8

raw patch · 2 files changed

+19/−20 lines, 2 filesdep ~aesondep ~basedep ~http-conduit

Dependency ranges changed: aeson, base, http-conduit, lens-aeson, text, vector

Files

oeis2.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack------ hash: d12ab6c84c2584d3b6f205f5db01501658692c007dbabf678896c297b60ea3bc  name:           oeis2-version:        1.0.7+version:        1.0.8 synopsis:       Interface for Online Encyclopedia of Integer Sequences (OEIS). description:    Release notes are here https://github.com/23prime/oeis2/releases category:       Math@@ -36,14 +34,14 @@   hs-source-dirs:       src   build-depends:-      aeson >=1.1 && <2.1-    , base >=4.7 && <5+      aeson ==2.*+    , base >=4.17 && <5     , containers >=0.5 && <0.7-    , http-conduit >=2.2 && <2.4+    , http-conduit >=2.2 && <3     , lens >=4.15 && <6-    , lens-aeson >=1.0 && <2-    , text ==1.2.*-    , vector ==0.12.*+    , lens-aeson >=1.2 && <2+    , text ==2.*+    , vector ==0.13.*   default-language: Haskell2010  test-suite oeis2-test@@ -56,14 +54,14 @@   ghc-options: -threaded -rtsopts -with-rtsopts=-N   build-depends:       QuickCheck-    , aeson >=1.1 && <2.1-    , base >=4.7 && <5+    , aeson ==2.*+    , base >=4.17 && <5     , containers >=0.5 && <0.7     , hspec-    , http-conduit >=2.2 && <2.4+    , http-conduit >=2.2 && <3     , lens >=4.15 && <6-    , lens-aeson >=1.0 && <2+    , lens-aeson >=1.2 && <2     , oeis2-    , text ==1.2.*-    , vector ==0.12.*+    , text ==2.*+    , vector ==0.13.*   default-language: Haskell2010
src/Math/OEIS/Internal.hs view
@@ -6,6 +6,7 @@ import           Control.Lens        ((^?), (^?!)) import           Control.Monad       (when) import           Data.Aeson.Lens+import           Data.Aeson.Key      (fromText) import           Data.Aeson.Types import           Data.Char import           Data.Functor@@ -121,7 +122,7 @@  getIntData :: Value -> T.Text -> (T.Text, Maybe OEISData) getIntData result k-  = let d = result ^? key k ._Integer+  = let d = result ^? key (fromText k) ._Integer     in case d of       Nothing -> (k, Nothing)       _       ->@@ -133,7 +134,7 @@  getTextData :: Value -> T.Text -> (T.Text, Maybe OEISData) getTextData result k-  = let d = result ^? key k ._String+  = let d = result ^? key (fromText k) ._String     in case d of       Nothing -> (k, Nothing)       _       ->@@ -147,11 +148,11 @@  getTextsData :: Value -> T.Text -> (T.Text, Maybe OEISData) getTextsData result k-  = let ds  = result ^? key k . _Array+  = let ds  = result ^? key (fromText k) . _Array     in case ds of       Nothing -> (k, Nothing)       _       ->-        let ts  = (\i -> result ^?! key k . nth i . _String) <$> [0..(len - 1)]+        let ts  = (\i -> result ^?! key (fromText k) . nth i . _String) <$> [0..(len - 1)]             len = fromJust $ V.length <$> ds         in case k of           "program" -> let prgs = parsePrograms emptyProgram [] ts