should-not-typecheck 1.0 → 1.0.1
raw patch · 2 files changed
+3/−3 lines, 2 files
Files
should-not-typecheck.cabal view
@@ -1,5 +1,5 @@ name: should-not-typecheck-version: 1.0+version: 1.0.1 synopsis: A HUnit/hspec assertion library to verify that an expression does not typecheck description: For examples and an introduction to the library please take a look at the <https://github.com/CRogers/should-not-typecheck#should-not-typecheck- README> on github.
src/Test/ShouldNotTypecheck.hs view
@@ -1,6 +1,6 @@ module Test.ShouldNotTypecheck (shouldNotTypecheck) where -import Control.Exception (evaluate, try, throw, ErrorCall(..))+import Control.Exception (evaluate, try, throwIO, ErrorCall(..)) import Data.List (isSuffixOf) import Test.HUnit.Lang (Assertion, assertFailure) @@ -18,4 +18,4 @@ Right _ -> assertFailure "Expected expression to not compile but it did compile" Left (ErrorCall msg) -> case isSuffixOf "(deferred type error)" msg of True -> return ()- False -> throw (ErrorCall msg)+ False -> throwIO (ErrorCall msg)