Skip to content

Instantly share code, notes, and snippets.

@carymrobbins
Last active May 2, 2017 23:58
Show Gist options
  • Save carymrobbins/d59f9337f5a0c7e00245 to your computer and use it in GitHub Desktop.
Save carymrobbins/d59f9337f5a0c7e00245 to your computer and use it in GitHub Desktop.
Yesod - manually creating a Key
-- 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