Commit d043132b authored by simonpj's avatar simonpj
Browse files

Test Trac #3406

parent 82d6d5b5
{-# LANGUAGE ScopedTypeVariables #-}
-- Trac #3406
-- A pattern signature that discards the bound variables
module T3406 where
type ItemColID a b = Int -- Discards a,b
get :: ItemColID a b -> a -> ItemColID a b
get (x :: ItemColID a b) = x :: ItemColID a b
\ No newline at end of file
T3406.hs:11:5:
The type variables `a, b'
should be bound by the pattern signature `ItemColID a b'
but are actually discarded by a type synonym
To fix this, expand the type synonym
[Note: I hope to lift this restriction in due course]
In the pattern: x :: ItemColID a b
In the definition of `get':
get (x :: ItemColID a b) = x :: ItemColID a b
......@@ -215,4 +215,5 @@ test('T3176', normal, compile_fail, [''])
test('T1633', normal, compile_fail, [''])
test('T2806', normal, compile_fail, [''])
test('T3323', normal, compile_fail, [''])
test('T3406', normal, compile_fail, [''])
Supports Markdown
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