Commit e89c96b3 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #4528, twice

parent 475e4b98
{-# LANGUAGE GADTs, StandaloneDeriving #-}
module T4528 where
data Foo a where
A, B :: Foo Int
C :: Foo Bool
deriving instance Enum (Foo a)
deriving instance Bounded (Foo a)
T4528.hs:9:1:
Can't make a derived instance of `Enum (Foo a)':
`Foo' is not an enumeration type
(an enumeration consists of one or more nullary, non-GADT constructors)
In the stand-alone deriving instance for `Enum (Foo a)'
T4528.hs:10:1:
Can't make a derived instance of `Bounded (Foo a)':
`Foo' is not an enumeration type
(an enumeration consists of one or more nullary, non-GADT constructors)
and
`Foo' does not have precisely one constructor
In the stand-alone deriving instance for `Bounded (Foo a)'
......@@ -31,3 +31,5 @@ test('drvfail-foldable-traversable1', normal, compile_fail,
[''])
test('T3833', normal, compile_fail, [''])
test('T3834', normal, compile_fail, [''])
test('T4528', normal, compile_fail, [''])
-- Crashed older GHCs when loaded into GHCi
module Main where
data T a = A | B | C deriving( Enum, Show )
main = print [A ..]
......@@ -30,3 +30,4 @@ test('T2529', normal, compile_and_run, [''])
test('drvrun-functor1', normal, compile_and_run, [''])
test('drvrun-foldable1', normal, compile_and_run, [''])
test('T4136', normal, compile_and_run, [''])
test('T4528a', normal, compile_and_run, [''])
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