Created
March 31, 2019 21:30
-
-
Save MagnificentPako/3e928f7ff4ebe3aabbecb42c9f82b1a5 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:14: error: | |
• Ambiguous type variable ‘m0’ arising from a use of ‘simpleAsyncFetch’ | |
prevents the constraint ‘(MonadIO m0)’ from being solved. | |
Relevant bindings include | |
fetchRRL :: S.Session -> Fetch FictionSource m0 a0 | |
(bound at src/Sources/RRL.hs:22:1) | |
Probable fix: use a type annotation to specify what ‘m0’ should be. | |
These potential instances exist: | |
instance [safe] MonadIO IO -- Defined in ‘Control.Monad.IO.Class’ | |
...plus two instances involving out-of-scope types | |
(use -fprint-potential-instances to see them all) | |
• In the expression: simpleAsyncFetch $ simpleFetch s | |
In an equation for ‘fetchRRL’: | |
fetchRRL 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 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: a ~ 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