diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T3965.hs')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T3965.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T3965.hs b/testsuite/tests/deriving/should_compile/T3965.hs new file mode 100644 index 0000000000..2ccaaadfdf --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T3965.hs @@ -0,0 +1,23 @@ +{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, StandaloneDeriving, TypeOperators, UndecidableInstances #-} +module T3965 where + +import Data.Data + +data T f e = Inl (f e) deriving (Data, Eq) + +instance (Typeable1 f) => Typeable1 (T f) where + typeOf1 _ = error "urk" + +newtype Expr f = In (f (Expr f)) +instance Typeable1 f => Typeable (Expr f) where + typeOf _ = error "urk" + +deriving instance (Typeable1 a, Data (a (Expr a))) => Data (Expr a) + +data Var e = Var String deriving (Data, Eq, Typeable) + +data Domain e g = Domain + (Expr (T Var)) + deriving (Data, Typeable) + + |