Commit 58d1d3ad authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add tests for trac #3833 and #3834

parent 41f01208
{-# LANGUAGE StandaloneDeriving #-}
-- {-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Data.Monoid
newtype DecodeMap e = DecodeMap [e]
deriving instance Monoid (DecodeMap e)
T3833.hs:9:0:
Can't make a derived instance of `Monoid (DecodeMap e)':
`Monoid' is not a derivable class
Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the stand-alone deriving instance for `Monoid (DecodeMap e)'
{-# LANGUAGE StandaloneDeriving #-}
class C a
instance C Int
newtype T = T Int
deriving instance C T
T3834.hs:8:0:
Can't make a derived instance of `C T':
`C' is not a derivable class
Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension
In the stand-alone deriving instance for `C T'
...@@ -36,3 +36,5 @@ test('drvfail-foldable-traversable1', ...@@ -36,3 +36,5 @@ test('drvfail-foldable-traversable1',
if_compiler_lt('ghc', '6.11', expect_fail), if_compiler_lt('ghc', '6.11', expect_fail),
compile_fail, compile_fail,
['']) [''])
test('T3833', normal, compile_fail, [''])
test('T3834', normal, compile_fail, [''])
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