Skip to content

Commit

Permalink
Merge pull request #695 from sbditto85/master
Browse files Browse the repository at this point in the history
expose parseReferences for the creation of custom QuasiQuoters
  • Loading branch information
paul-rouse authored Sep 12, 2017
2 parents 4885ca9 + 1496c21 commit 9396c27
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions persistent-template/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.5.3

* Exposed `parseReferences` to allow custom QuasiQuoters

## 2.5.2

* Fix incorrect `ToJSON`/`FromJSON` instance generation for generic
Expand Down
2 changes: 2 additions & 0 deletions persistent-template/Database/Persist/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module Database.Persist.TH
-- * Internal
, packPTH
, lensPTH
, parseReferences
) where

import Prelude hiding ((++), take, concat, splitAt, exp)
Expand Down Expand Up @@ -121,6 +122,7 @@ persistFileWith ps fp = do

-- calls parse to Quasi.parse individual entities in isolation
-- afterwards, sets references to other entities
-- | @since 2.5.3
parseReferences :: PersistSettings -> Text -> Q Exp
parseReferences ps s = lift $
map (mkEntityDefSqlTypeExp embedEntityMap entMap) noCycleEnts
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.5.2
version: 2.5.3
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
Expand Down

0 comments on commit 9396c27

Please sign in to comment.