Commit b34a1531 authored by simonpj's avatar simonpj
Browse files

Lazy patterns can't be unboxed (Trac 845)

parent 0628d60a
...@@ -143,3 +143,4 @@ test('tcfail155', normal, compile_fail, ['']) ...@@ -143,3 +143,4 @@ test('tcfail155', normal, compile_fail, [''])
test('tcfail156', normal, compile_fail, ['']) test('tcfail156', normal, compile_fail, [''])
test('tcfail157', normal, compile_fail, ['']) test('tcfail157', normal, compile_fail, [''])
test('tcfail158', normal, compile_fail, ['']) test('tcfail158', normal, compile_fail, [''])
test('tcfail159', normal, compile_fail, [''])
{-# OPTIONS -fglasgow-exts #-}
module ShouldFail where
h :: Int -> (# Int, Int #)
h x = (# x,x #)
foo x = case h x of
~(# p, q #) -> p
tcfail159.hs:9:3:
Couldn't match kind `(#)' against `*'
When matching the kinds of `(# Int, Int #) :: (#)' and `bx :: *'
Expected type: bx
Inferred type: (# Int, Int #)
In the pattern: ~(# p, q #)
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