Skip to content

Instantly share code, notes, and snippets.

@Wizek
Created October 28, 2017 00:22
Show Gist options
  • Save Wizek/d5d66b3f7e95b329fdb2edc1d5207455 to your computer and use it in GitHub Desktop.
Save Wizek/d5d66b3f7e95b329fdb2edc1d5207455 to your computer and use it in GitHub Desktop.
./test-suite/HsDiExample/MainSpec.hs:20:7 error:
• Ambiguous type variable ‘m0’
prevents the constraint ‘(Monad m0)’ from being solved.
• When checking that the inferred type
logger :: forall b t (m :: * -> *).
Monad m =>
Data.Text.Internal.Text -> IO ()
is as general as its inferred signature
logger :: Data.Text.Internal.Text -> IO ()
In a stmt of a 'do' block:
(let (main, _, _, _, logger) = mainT
in
main
(readModifyIORef clockStart (addUTCTime 1))
(return ["sample.txt"])
(\ "sample.txt" -> return "Alyssa")
logger)
In the second argument of ‘($)’, namely
‘do { logs <- newIORef [];
clockStart <- newIORef $ posixSecondsToUTCTime 0;
(let (main, _, _, _, logger) = mainT
in
main
(readModifyIORef clockStart (addUTCTime 1))
(return ["sample.txt"])
(\ "sample.txt" -> return "Alyssa")
logger);
readIORef logs }’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment