Commit 182805d1 authored by simonpj's avatar simonpj
Browse files

Fix GADT tests

parent 6b6381fe
......@@ -25,7 +25,7 @@ test('nbe', normal, compile, [''])
test('while', normal, compile_and_run, [''])
test('rw', normal, compile_fail, [''])
test('lazypat', normal, compile_fail, [''])
test('lazypatok', normal, compile_fail, [''])
test('lazypatok', normal, compile, [''])
test('tc', normal, compile_and_run, [''])
test('arrow', normal, compile, [''])
test('tdpe', normal, compile, [''])
......
......@@ -2,8 +2,7 @@
-- It's not clear whether this one should succed or fail,
-- Arguably it should succeed because the type refinement on
-- T1 should make (y::Int). Currently, though, it fails, and
-- I don't think it's easy to fix, so I'm leaving it for now.
-- T1 should make (y::Int). Currently, though, it succeeds
module ShouldFail where
......
lazypatok.hs:14:17:
Couldn't match the rigid variable `a' against `Int'
`a' is bound by the type signature for `f'
Expected type: Int
Inferred type: a
In the second argument of `(+)', namely `y'
In the definition of `f': f ~(T1 x, y) = x + y
rw.hs:14:32:
Couldn't match the rigid variable `a' against `Int'
`a' is bound by the type signature for `writeInt'
Expected type: a
Inferred type: Int
In the expression: 1 :: Int
Couldn't match expected type `a' (a rigid variable)
against inferred type `Int'
`a' is bound by the type signature for `writeInt' at rw.hs:12:13
In the second argument of `writeIORef', namely `(1 :: Int)'
In the call (writeIORef ref (1 :: Int))
In the expression: writeIORef ref (1 :: Int)
rw.hs:19:28:
Couldn't match the rigid variable `a' against `Bool'
`a' is bound by the type signature for `readBool'
Expected type: a -> IO b
Inferred type: Bool -> IO ()
In the expression: print . not
rw.hs:19:36:
Couldn't match expected type `a' (a rigid variable)
against inferred type `Bool'
`a' is bound by the type signature for `readBool' at rw.hs:16:13
Expected type: a -> t
Inferred type: Bool -> Bool
In the second argument of `(.)', namely `not'
In the second argument of `(>>=)', namely `(print . not)'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment