Created
March 31, 2019 21:20
-
-
Save MagnificentPako/15b7b08ccac3f6467a4e1975a60c7ed9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/Sources/RRL.hs:22:12: error: | |
• Could not deduce (MonadIO ((->) (ASeq FictionSource a))) | |
arising from a use of ‘liftIO’ | |
from the context: MonadIO m | |
bound by the type signature for: | |
fetchRRL :: forall (m :: * -> *) a. | |
MonadIO m => | |
Fetch FictionSource m a | |
at src/Sources/RRL.hs:21:1-48 | |
• In the first argument of ‘(>>=)’, namely ‘liftIO S.newSession’ | |
In the expression: | |
liftIO S.newSession >>= \ s -> simpleAsyncFetch $ simpleFetch s | |
In an equation for ‘fetchRRL’: | |
fetchRRL | |
= liftIO S.newSession >>= \ s -> simpleAsyncFetch $ simpleFetch s | |
where | |
simpleFetch :: S.Session -> FictionSource a -> IO a | |
simpleFetch s (Chapter cid) = fetchChapter cid s | |
simpleFetch s (Fiction fid) = fetchFiction fid s | |
| | |
22 | fetchRRL = liftIO S.newSession >>= \s -> simpleAsyncFetch $ simpleFetch s | |
| ^^^^^^^^^^^^^^^^^^^ | |
src/Sources/RRL.hs:26:56: error: | |
• Couldn't match expected type ‘p0’ with actual type ‘S.Session’ | |
‘p0’ is untouchable | |
inside the constraints: a1 ~ FictionInfo | |
bound by a pattern with constructor: | |
Fiction :: String -> FictionSource FictionInfo, | |
in an equation for ‘simpleFetch’ | |
at src/Sources/RRL.hs:26:24-34 | |
• In the second argument of ‘fetchFiction’, namely ‘s’ | |
In the expression: fetchFiction fid s | |
In an equation for ‘simpleFetch’: | |
simpleFetch s (Fiction fid) = fetchFiction fid s | |
| | |
26 | simpleFetch s (Fiction fid) = fetchFiction fid s | |
| ^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment