diff options
Diffstat (limited to 'testsuite/tests/deriving/should_fail/drvfail001.hs')
-rw-r--r-- | testsuite/tests/deriving/should_fail/drvfail001.hs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_fail/drvfail001.hs b/testsuite/tests/deriving/should_fail/drvfail001.hs new file mode 100644 index 0000000000..47447fb3e3 --- /dev/null +++ b/testsuite/tests/deriving/should_fail/drvfail001.hs @@ -0,0 +1,26 @@ +{- From: Ian Bayley + Sent: Tuesday, June 29, 1999 3:39 PM + To: hugs-bugs@haskell.org + Subject: Show for higher-order nested datatypes + + + Is "deriving Show" meant to work for higher-order nested datatypes ? + Hugs hangs when loading in the following file: +-} + +module Foo where + +type SqMat a = SM Nil a + +data SM f a = ZeroS (f (f a)) | SuccS (SM (Cons f) a) + deriving Show + +-- Show (f (f a)), Show (SM (Cons f) a) => Show (SM f a) + +data Nil a = MkNil deriving Show + +data Cons f a = MkCons a (f a) + deriving Show + + + |