Skip to content

Commit

Permalink
Merge pull request #98 from haskellari/no-eq
Browse files Browse the repository at this point in the history
Remove Eq requirement from ediffGolden
  • Loading branch information
phadej authored Jan 8, 2025
2 parents f25aa77 + 8d118b8 commit f4f024b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
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

0 comments on commit f4f024b

Please sign in to comment.