packages feed

oeis2 1.0.0 → 1.0.1

raw patch · 4 files changed

+12/−12 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

− ChangeLog.md
@@ -1,3 +0,0 @@-# Changelog for oeis--## Unreleased changes
README.md view
@@ -46,7 +46,7 @@     Just [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,...     ``` --  Get Mathematica function from sub-sequence+- Get Mathematica function from sub-sequence      ```haskell     ghci>mathematica <$> lookupSeq (SubSeq [1,2,2,3,3,3,4,4,4,4])
oeis2.cabal view
@@ -4,24 +4,23 @@ -- -- see: https://github.com/sol/hpack ----- hash: a38920cd4910bd65d44f33dc4e93231bd7f1caa84141668368c05653a9d72af5+-- hash: 34d9968016b6527d432a5693a72564be6591109ce021dc22ece2b13083f75f00  name:           oeis2-version:        1.0.0+version:        1.0.1 synopsis:       Interface for Online Encyclopedia of Integer Sequences (OEIS).-description:    Please see the README on GitHub at <https://github.com/23prime/oeis2#readme>+description:    Release notes are here https://github.com/23prime/oeis2/releases category:       Math homepage:       https://github.com/23prime/oeis2#readme bug-reports:    https://github.com/23prime/oeis2/issues author:         Taisuke Hikawa maintainer:     a23b23c23d23e@gmail.com-copyright:      2018 Taisuke Hikawa+copyright:      2019 Taisuke Hikawa license:        BSD3 license-file:   LICENSE build-type:     Simple extra-source-files:     README.md-    ChangeLog.md  source-repository head   type: git
src/Math/OEIS/Internal.hs view
@@ -24,10 +24,10 @@ -- JSON Keys -- --------------- intKeys = [-  "number", "offset", "references", "revision"+  "number", "references", "revision"   ] textKeys = [-  "id", "data", "name", "keyword", "author", "time", "created"+  "id", "data", "name", "keyword", "offset", "author", "time", "created"   ] textsKeys = [   "comment", "reference", "link", "formula", "example", "maple", "mathematica",@@ -133,6 +133,7 @@           "data"    -> let d' = T.unpack $ '[' .+ fromJust d +. ']'                        in (k, Just $ SEQ (read d' :: SeqData))           "id"      -> (k, TXTS . T.splitOn " " <$> d)+          "offset"  -> (k, INT . read . T.unpack . T.take 1 <$> d)           _         -> (k, TXT <$> d)   | k `elem` textsKeys   = let ds  = result ^? key k . _Array@@ -212,7 +213,10 @@ parsePrograms (lang0, funcs) prgs (t : ts)   | T.head t == '(' = let prgs' = prgs ++ [(lang, [func])]                       in parsePrograms (lang, [func]) prgs' ts-  | otherwise       = let prgs' = init prgs ++ [(lang0, funcs ++ [t])]+  | null prgs       = let prgs' = prgs ++ [("", [t])]+                      in parsePrograms ("", [t]) prgs' ts+  | otherwise       = let funcs' = filter (not . T.null) funcs ++ [t]+                          prgs'  = init prgs ++ [(lang0, funcs')]                       in parsePrograms (lang0, funcs ++ [t]) prgs' ts   where     (lang', func') = T.breakOn ")" t