Last active
May 2, 2017 23:58
-
-
Save carymrobbins/d59f9337f5a0c7e00245 to your computer and use it in GitHub Desktop.
Yesod - manually creating a Key
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
-- Good | |
import Database.Persist.Sql | |
toSqlKey 1 :: UserId | |
-- Bad | |
Prelude.read "UserKey {unUserKey = SqlBackendKey {unSqlBackendKey = 1}}" :: UserId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment