Skip to content

Commit

Permalink
Derive Generic instances for non-generic newtype keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Kempf committed Nov 26, 2019
1 parent d79385d commit 6e05d72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion persistent-template/Database/Persist/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ mkKeyTypeDec mps t = do
then do pfDec <- pfInstD
return (pfDec, [''Show, ''Read, ''Eq, ''Ord, ''Generic])
else do
let allInstances = [''Show, ''Read, ''Eq, ''Ord, ''PathPiece, ''ToHttpApiData, ''FromHttpApiData, ''PersistField, ''PersistFieldSql, ''ToJSON, ''FromJSON]
let allInstances = [''Show, ''Read, ''Eq, ''Ord, ''PathPiece, ''ToHttpApiData, ''FromHttpApiData, ''PersistField, ''PersistFieldSql, ''ToJSON, ''FromJSON, ''Generic]
if customKeyType
then return ([], allInstances)
else do
Expand Down
2 changes: 1 addition & 1 deletion persistent-template/persistent-template.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: persistent-template
version: 2.7.3
version: 2.7.4
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
Expand Down

0 comments on commit 6e05d72

Please sign in to comment.