Created
September 17, 2012 05:01
-
-
Save cark/3735643 to your computer and use it in GitHub Desktop.
This file contains 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
insertPerson :: MonadState MyDb m => Person -> m (Fact Person) | |
insertPerson = insertRecord personRel | |
--fillit :: MonadState MyDb m => m () | |
fillit = do | |
a <- insertPerson (Person "john") | |
b <- insertPerson (Person "paul") | |
return () | |
-- if i leave the type declaraion of fillit commented, i get this error : | |
No instance for (MonadState MyDb m0) | |
arising from a use of `insertPerson' | |
Possible fix: add an instance declaration for (MonadState MyDb m0) | |
In a stmt of a 'do' block: a <- insertPerson (Person "john") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment