Skip to content

Commit

Permalink
Fix type error message with AtLeastOneUniqueKey class
Browse files Browse the repository at this point in the history
  • Loading branch information
parsonsmatt committed Aug 28, 2024
1 parent 40ed447 commit 6a75190
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

* []()
* 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 <michael@snoyman.com>
Expand Down

0 comments on commit 6a75190

Please sign in to comment.