Skip to content

Commit

Permalink
Don't discover constrained instances (#1329)
Browse files Browse the repository at this point in the history
* Don't discover constrained instances

* Bump version, add changelog
  • Loading branch information
masaeedu committed Oct 13, 2021
1 parent 9e84929 commit 34c8b8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions persistent/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog for persistent

## 2.13.2.1

* [#1329](https://github.com/yesodweb/persistent/pull/1329)
* Prevent discovery of constrained `PersistEntity` instances in
`discoverEntities` (since the discovered instances won't work without
constraints anyway).

## 2.13.2.0

* [#1314](https://github.com/yesodweb/persistent/pull/1314)
Expand Down
2 changes: 1 addition & 1 deletion persistent/Database/Persist/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3104,7 +3104,7 @@ discoverEntities = do
mapMaybe getDecType instances
getDecType dec =
case dec of
InstanceD _moverlap _cxt typ _decs ->
InstanceD _moverlap [] typ _decs ->
stripPersistEntity typ
_ ->
Nothing
Expand Down
2 changes: 1 addition & 1 deletion persistent/persistent.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: persistent
version: 2.13.2.0
version: 2.13.2.1
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
Expand Down

0 comments on commit 34c8b8f

Please sign in to comment.