mirror of
https://github.com/tfausak/witch.git
synced 2024-11-22 14:58:13 +03:00
Fix build on GHC 8.2
This commit is contained in:
parent
b970a11851
commit
0b89665b44
@ -1,4 +1,3 @@
|
||||
- group: { name: dollar, enabled: true }
|
||||
- group: { name: generalise, enabled: true }
|
||||
- ignore: { name: Use lambda-case }
|
||||
- ignore: { name: Use tuple-section }
|
||||
|
@ -2098,14 +2098,14 @@ shouldBe :: (Stack.HasCallStack, Eq a, Show a) => a -> a -> HUnit.Assertion
|
||||
shouldBe = (HUnit.@?=)
|
||||
|
||||
shouldSatisfy :: (Stack.HasCallStack, Show a) => a -> (a -> Bool) -> HUnit.Assertion
|
||||
shouldSatisfy value predicate = HUnit.assertBool ("predicate failed on: " <> show value) $ predicate value
|
||||
shouldSatisfy value predicate = HUnit.assertBool ("predicate failed on: " ++ show value) $ predicate value
|
||||
|
||||
shouldThrow :: (Stack.HasCallStack, Exception.Exception e) => IO a -> Selector e -> HUnit.Assertion
|
||||
shouldThrow action predicate = do
|
||||
result <- Exception.try action
|
||||
case result of
|
||||
Right _ -> HUnit.assertFailure "did not get expected exception"
|
||||
Left exception -> HUnit.assertBool ("predicate failed on expected exception: " <> show exception) $ predicate exception
|
||||
Left exception -> HUnit.assertBool ("predicate failed on expected exception: " ++ show exception) $ predicate exception
|
||||
|
||||
specToTest :: Stack.HasCallStack => Spec -> HUnit.Test
|
||||
specToTest = HUnit.TestList . Foldable.toList . Writer.execWriter
|
||||
|
@ -23,7 +23,7 @@ flag pedantic
|
||||
|
||||
common library
|
||||
build-depends:
|
||||
, base >= 4.10.0 && < 4.18
|
||||
, base >= 4.10 && < 4.18
|
||||
, bytestring >= 0.10.8 && < 0.12
|
||||
, containers >= 0.5.10 && < 0.7
|
||||
, text >= 1.2.3 && < 1.3 || >= 2.0 && < 2.1
|
||||
@ -72,7 +72,7 @@ library
|
||||
import: library
|
||||
|
||||
build-depends:
|
||||
, template-haskell >= 2.12.0 && < 2.20
|
||||
, template-haskell >= 2.12 && < 2.20
|
||||
exposed-modules:
|
||||
Witch
|
||||
Witch.From
|
||||
@ -95,7 +95,7 @@ test-suite witch-test-suite
|
||||
|
||||
build-depends:
|
||||
, HUnit >= 1.6.1 && < 1.7
|
||||
, transformers
|
||||
, transformers >= 0.5.2 && < 0.7
|
||||
hs-source-dirs: source/test-suite
|
||||
main-is: Main.hs
|
||||
type: exitcode-stdio-1.0
|
||||
|
Loading…
Reference in New Issue
Block a user