Skip to content

Instantly share code, notes, and snippets.

@X1011
Created February 1, 2015 10:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save X1011/693547bd9bea29aa678b to your computer and use it in GitHub Desktop.
Save X1011/693547bd9bea29aa678b to your computer and use it in GitHub Desktop.
unit-test-example failure
codio@saturn-granite:~/workspace$ cabal test
Running 2 test suites...
Test suite spec: RUNNING...
Test suite spec: PASS
Test suite logged to: dist/test/unit-test-example-0.0.0-spec.log
Test suite doctest: RUNNING...
### Failure in Codec/Base64.hs:14: expression `decode (encode xs) == xs'
<interactive>:37:3:
Not in scope: ‘polyQuickCheck’
In the splice: $(polyQuickCheck (mkName "doctest_prop"))
<interactive>:37:3:
GHC stage restriction:
‘polyQuickCheck’ is used in a top-level splice or annotation,
and must be imported, not defined locally
In the expression: polyQuickCheck (mkName "doctest_prop")
In the splice: $(polyQuickCheck (mkName "doctest_prop"))
Examples: 3 Tried: 3 Errors: 0 Failures: 1
Test suite doctest: FAIL
Test suite logged to: dist/test/unit-test-example-0.0.0-doctest.log
1 of 2 test suites (1 of 2 test cases) passed.
@FranklinChen
Copy link

One other thing, pointed out to me tonight at the workshop, was that I forgot to mention the need to remove old config directories ~/.ghc and ~/.cabal when installing much newer versions of GHC and Cabal. For reference, I have updated my instructions accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment