Skip to content

Instantly share code, notes, and snippets.

@edwinb
Created January 27, 2014 00:08
Show Gist options
  • Save edwinb/8641189 to your computer and use it in GitHub Desktop.
Save edwinb/8641189 to your computer and use it in GitHub Desktop.
Better error messages...
Problem:
--------
You tried to use the random number generator effect when it wasn't available.
New error message:
------------------
Expr.idr:31:6:When elaborating right hand side of eval:
Can't solve goal
SubList [RND] [(EXCEPTION String),STDIO,(STATE (List (String, Integer)))]
Old error message:
------------------
Expr.idr:31:6:When elaborating right hand side of eval:
Can't unify
Eff IO Integer [RND] (\ result => [RND])
with
Eff IO a [(MkEff () (Exception String)),(MkEff () StdIO),(MkEff (List (String, Integer)) State)] xs'
Specifically:
Can't unify
Integer
with
()
I think that's progress :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment