Skip to content

Commit

Permalink
Fix type error message with AtLeastOneUniqueKey class (#1544)
Browse files Browse the repository at this point in the history
* Fix type error message with AtLeastOneUniqueKey class

* changelog
  • Loading branch information
parsonsmatt authored Aug 28, 2024
1 parent 40ed447 commit 24f5d92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions persistent/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for persistent

## 2.14.6.3

* [#1544](https://github.com/yesodweb/persistent/pull/1544)
* Fix type error message when no unique keys are defined on a model and you
use a function with constraint `AtLeastOneUniqueKey`.

## 2.14.6.2

* [#1536](https://github.com/yesodweb/persistent/pull/1536/)
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 @@ -2306,7 +2306,7 @@ mkUniqueKeyInstances mps entDef = do
typeErrorAtLeastOne :: Q [Dec]
typeErrorAtLeastOne = do
let impl = mkImpossible requireUniquesPName
cxt <- typeErrorMultipleCtx
cxt <- typeErrorNoneCtx
pure [instanceD cxt atLeastOneUniqueKeyClass impl]

singleUniqueKey :: Q [Dec]
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.14.6.2
version: 2.14.6.3
license: MIT
license-file: LICENSE
author: Michael Snoyman <[email protected]>
Expand Down

0 comments on commit 24f5d92

Please sign in to comment.