Commit 06d6752e authored by simonpj's avatar simonpj

[project @ 2004-11-09 12:12:40 by simonpj]

Add an implicit-paramter test
parent 9f7e2704
...@@ -193,3 +193,4 @@ test('tc180', normal, compile, ['']) ...@@ -193,3 +193,4 @@ test('tc180', normal, compile, [''])
test('tc181', normal, compile, ['']) test('tc181', normal, compile, [''])
test('tc182', normal, compile, ['']) test('tc182', normal, compile, [''])
test('tc183', normal, compile, ['']) test('tc183', normal, compile, [''])
test('tc184', normal, compile, [''])
{-# OPTIONS -fglasgow-exts #-}
-- Both these two fail in 6.2.2
module ShouldCompile where
-- A record with an 'existential' context that binds no
-- type vars, so record selectors should be OK
data Test1 = (?val::Bool) => Test1 { name :: String }
instance Show Test1 where
show p = name p
-- Same, but no record selector; GHC 6.2.2 failed because it tried
-- to derive generic to/from
data Test2 = (?val::Bool) => Test2 String
f (Test2 s) | ?val = s
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