Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Eq requirement from ediffGolden #98

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.4

- Remove 'Eq a' requirement from 'ediffGolden'. The constraint wasn't used, as we only compare 'Expr' representations.

## 0.3.3

- Change 'ediffGolden' so that parse errors in expected file don't cause the hard failure.
Expand Down
4 changes: 2 additions & 2 deletions src/Data/TreeDiff/Golden.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import qualified Text.PrettyPrint.ANSI.Leijen as WL
-- for a proper example.
--
ediffGolden
:: (Eq a, ToExpr a)
:: ToExpr a
=> (testName -> IO Expr -> IO Expr -> (Expr -> Expr -> IO (Maybe String)) -> (Expr -> IO ()) -> testTree) -- ^ 'goldenTest'
-> testName -- ^ test name
-> FilePath -- ^ path to "golden file"
Expand All @@ -51,7 +51,7 @@ ediffGolden impl testName fp x = ediffGolden1 impl' testName fp (\() -> x) where
-- @since 0.3.2
--
ediffGolden1
:: forall a arg testName testTree. (Eq a, ToExpr a)
:: forall a arg testName testTree. ToExpr a
=> (testName -> IO Expr -> (arg -> IO Expr) -> (Expr -> Expr -> IO (Maybe String)) -> (Expr -> IO ()) -> testTree) -- ^ 'goldenTest'
-> testName -- ^ test name
-> FilePath -- ^ path to "golden file"
Expand Down
4 changes: 2 additions & 2 deletions tree-diff.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: tree-diff
version: 0.3.3
version: 0.3.4
synopsis: Diffing of (expression) trees.
category: Data, Testing
description:
Expand Down Expand Up @@ -171,4 +171,4 @@ benchmark tree-diff-bench
-- extra dependencies
build-depends:
, criterion ^>=1.6.3.0
, Diff ^>=0.5
, Diff ^>=1.0