-
-
Save Wizek/dd10228f2c0e658a3b84c7e2f714699d to your computer and use it in GitHub Desktop.
Yesod - manually creating a Key
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
-- 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