Commit 00f202fd authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add test for Trac #4188

parent 9b08e179
{-# LANGUAGE TemplateHaskell, GADTs #-}
module T4188 where
import Language.Haskell.TH
import IO
class C a where {}
data T1 a where
MkT1 :: a -> b -> T1 a
data T2 a where
MkT2 :: (C a, C b) => a -> b -> T2 a
data T3 x where
MkT3 :: (C x, C y) => x -> y -> T3 (x,y)
$(do { dec1 <- reify ''T1
; runIO (putStrLn (pprint dec1))
; dec2 <- reify ''T2
; runIO (putStrLn (pprint dec2))
; dec3 <- reify ''T3
; runIO (putStrLn (pprint dec3))
; runIO (hFlush stdout)
; return [] })
data T4188.T1 a_0 = forall b_1 . T4188.MkT1 a_0 b_1
data T4188.T2 a_0
= forall b_1 . (T4188.C a_0, T4188.C b_1) => T4188.MkT2 a_0 b_1
data T4188.T3 x_0
= forall x_1 y_2 . (x_0 ~ (x_1, y_2), T4188.C x_1, T4188.C y_2) =>
T4188.MkT3 x_1 y_2
......@@ -163,3 +163,4 @@ test('T3845', normal, compile, ['-v0'])
test('T3899', extra_clean(['T3899a.hi','T3899a.o']),
multimod_compile, ['T3899','-v0 -ddump-splices -dsuppress-uniques'])
test('T4056', normal, compile, ['-v0'])
test('T4188', normal, compile, ['-v0'])
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment