Last active
January 23, 2019 05:55
-
-
Save gregberns/f6f68a33f89ba8182914f28419876257 to your computer and use it in GitHub Desktop.
Attempt at running Hedgehog readme examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lib | |
( someFunc | |
) where | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
import Hedgehog | |
import qualified Hedgehog.Gen as Gen | |
import qualified Hedgehog.Range as Range | |
someFunc :: IO () | |
someFunc = putStrLn "someFunc" | |
prop_reverse :: Property | |
prop_reverse = | |
property $ do | |
xs <- forAll $ Gen.list (Range.linear 0 100) Gen.alpha | |
reverse (reverse xs) === xs | |
tests1 :: IO Bool | |
tests1 = | |
checkParallel $$(discover) | |
tests2 :: IO Bool | |
tests2 = | |
checkParallel $ Group "Test.Example" [ | |
("prop_reverse", prop_reverse) | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• Variable not in scope: | |
($$) | |
:: (Group -> m0 Bool) | |
-> Hedgehog.Internal.TH.TExpQ Group -> IO Bool | |
• Perhaps you meant one of these: | |
‘$’ (imported from Prelude), ‘$!’ (imported from Prelude), | |
‘<$’ (imported from Prelude) | |
| | |
23 | checkParallel $$(discover) | |
| ^^ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• Couldn't match expected type ‘GroupName’ | |
with actual type ‘[Char]’ | |
• In the first argument of ‘Group’, namely ‘"Test.Example"’ | |
In the second argument of ‘($)’, namely | |
‘Group "Test.Example" [("prop_reverse", prop_reverse)]’ | |
In the expression: | |
checkParallel | |
$ Group "Test.Example" [("prop_reverse", prop_reverse)] | |
| | |
27 | checkParallel $ Group "Test.Example" [ | |
| ^^^^^^^^^^^^^^ | |
================================================================== | |
• Couldn't match expected type ‘PropertyName’ | |
with actual type ‘[Char]’ | |
• In the expression: "prop_reverse" | |
In the expression: ("prop_reverse", prop_reverse) | |
In the second argument of ‘Group’, namely | |
‘[("prop_reverse", prop_reverse)]’ | |
| | |
28 | ("prop_reverse", prop_reverse) | |
| ^^^^^^^^^^^^^^ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FIX: Move the language extensions ABOVE the
module