should-not-typecheck
should-not-typecheck copied to clipboard
Change in behavior from GHC 7.10.3 to GHC 8.0.1?
Upon upgrade from Stackage LTS 6.x (corresponding to GHC 7.10.3) to 7.0 (corresponding to GHC 8.0.1), tests that used to succeed now fail. A sample repo is here: https://github.com/FranklinChen/should-not-typecheck-example
$ stack test --resolver lts-6
shows that the tests used to pass.
$ stack test
will reproduce the new errors under lts-7.
The errors now:
test/ShouldNotTypecheckExampleSpec.hs:21:
1) ShouldNotTypecheckExample.should-not-typecheck you can run code even if it contains ill-typed parts
uncaught exception: TypeError (src/ShouldNotTypecheckExample.hs:8:28: error:
• Couldn't match expected type ‘[Char]’ with actual type ‘Bool’
• In the second argument of ‘(/)’, namely ‘True’
In the expression: "world" / True
In the expression: ["world" / True, "!"]
(deferred type error))
test/ShouldNotTypecheckExampleSpec.hs:23:
2) ShouldNotTypecheckExample.should-not-typecheck deferred type errors are only lazily reached
uncaught exception: TypeError (src/ShouldNotTypecheckExample.hs:14:28: error:
• Couldn't match expected type ‘[Char]’ with actual type ‘Bool’
• In the second argument of ‘(/)’, namely ‘True’
In the expression: "world" / True
In the expression: ["world" / True, "!"]
(deferred type error))