Commit 9d8cfd8d authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tests for -XGeneralizedNewtypeDeriving

parent 2cd7f402
......@@ -62,3 +62,5 @@ test('read052', normal, compile, [''])
test('read053', normal, compile, [''])
test('read054', normal, compile, [''])
test('read055', normal, compile, [''])
test('read056', normal, compile, [''])
test('read057', normal, compile, [''])
{-# OPTIONS_GHC -XGeneralizedNewtypeDeriving #-}
module Foo where
class C a
instance C Int
newtype Foo = Foo Int
deriving C
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Foo where
class C a
instance C Int
newtype Foo = Foo Int
deriving C
......@@ -45,3 +45,4 @@ test('read035', normal, compile_fail, [''])
test('read036', normal, compile_fail, [''])
test('read037', normal, compile_fail, [''])
test('read038', normal, compile_fail, [''])
test('read039', normal, compile_fail, [''])
module Foo where
class C a
instance C Int
newtype Foo = Foo Int
deriving C
read039.hs:7:0:
Can't make a derived instance of `C Foo'
(`C' is not a derivable class
Try -fglasgow-exts for GHC's newtype-deriving extension)
In the newtype declaration for `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