Commit c6953931 authored by simonpj's avatar simonpj
Browse files

[project @ 2002-01-03 12:36:04 by simonpj]

update output, add drvfail002
parent e1d30e6c
......@@ -4,5 +4,6 @@ include ($confdir ++ "/../vanilla-test.T")
-- Args to vtcf are: extra compile flags
test "drvfail001" { vtcf("") }
test "drvfail002" { vtcf("") }
test "drvfail004" { vtcf("") }
test "drvfail007" { vtcf("") }
drvfail001.hs:15:
No instance for `Show (f (f a))'
When deriving the `Show' instance for type `SM'
drvfail001.hs:21:
No instance for `Show (f a)'
When deriving classes for `Cons'
When deriving the `Show' instance for type `Cons'
{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances #-}
-- The Show instance for S would have form
-- instance X T c => Show S
-- which is hard to deal with. It sent GHC 5.01 into
-- an infinite loop; now it should be rejected.
module ShouldFail where
data T = T Integer
class X a b | a -> b where
f :: a -> b
instance X T c => Show T where
show _ = ""
data S = S T deriving Show
drvfail002.hs:18:
Can't derive instances where the instance context mentions
type variables that are not data type parameters
Offending constraint: X T c
When deriving the `Show' instance for type `S'
drvfail007.hs:4:
No instance for `Eq (Int -> Int)'
When deriving classes for `Foo'
When deriving the `Eq' instance for type `Foo'
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