summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/drvfail009.hs
blob: 06155c38a16aa675220f5e501e4426f9cdd156aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses #-}

-- Various newtype-deriving failures

module ShouldFail where


class C a b 

newtype T1 = T1 Int deriving( C )
	-- Wrong arity

newtype T2 = T2 Int deriving( Monad )
	-- Type constructor has wrong kind

newtype T3 a = T3 Int deriving( Monad )
	-- Rep type has wrong kind

newtype T4 a = T4 (Either a a) deriving( Monad )
	-- Eta fails