Skip to content

Commit

Permalink
Add Data.Functor to import for GHC 7.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
23prime committed Feb 28, 2019
1 parent 488ad89 commit 1147a4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Math/OEIS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module Math.OEIS (
OEISSeq(..)
) where

import Data.Functor
import Data.List
import Data.Maybe (fromMaybe, listToMaybe)
import qualified Data.Vector as V
Expand Down
5 changes: 3 additions & 2 deletions src/Math/OEIS/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Control.Monad (when)
import Data.Aeson.Lens
import Data.Aeson.Types
import Data.Char
import Data.Functor
import Data.List
import Data.Maybe (fromJust, fromMaybe, isNothing)
import qualified Data.Text as T
Expand Down Expand Up @@ -88,7 +89,7 @@ getResults ss start bound vs = do
results = case results' of
Nothing -> return []
Just vs' ->
let len = length vs'
let len = V.length vs'
start' = start + 10
diff = case bound of
0 -> len
Expand Down Expand Up @@ -140,7 +141,7 @@ getData result k
in case ds of
Nothing -> (k, Nothing)
_ -> let ts = (\i -> result ^?! key k . nth i . _String) <$> [0..(len - 1)]
len = fromJust $ length <$> ds
len = fromJust $ V.length <$> ds
in case k of
"program" -> let prgs = parsePrograms emptyProgram [] ts
in (k, Just $ PRGS prgs)
Expand Down
1 change: 1 addition & 0 deletions test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import Data.Aeson.Lens
import Data.Aeson.Types
import Data.Functor
import Data.List
import Data.Maybe (fromJust)
import qualified Data.Text as T
Expand Down

0 comments on commit 1147a4f

Please sign in to comment.