diff options
Diffstat (limited to 'testsuite/tests/th/T12478_5.hs')
-rw-r--r-- | testsuite/tests/th/T12478_5.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/th/T12478_5.hs b/testsuite/tests/th/T12478_5.hs new file mode 100644 index 0000000000..bbbcb5502e --- /dev/null +++ b/testsuite/tests/th/T12478_5.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE UnboxedSums #-} +module T12478_5 where + +import Language.Haskell.TH + +foo :: $(conT (unboxedSumTypeName 2) `appT` conT ''() `appT` conT ''()) + -> $(conT (unboxedSumTypeName 2) `appT` conT ''() `appT` conT ''()) +foo $(conP (unboxedSumDataName 1 2) [conP '() []]) + = $(conE (unboxedSumDataName 2 2) `appE` conE '()) +foo $(conP (unboxedSumDataName 2 2) [conP '() []]) + = $(conE (unboxedSumDataName 2 2) `appE` conE '()) + +foo2 :: (# () | () #) + -> $(conT (unboxedSumTypeName 2) `appT` conT ''() `appT` conT ''()) +foo2 (# () | #) = $(conE (unboxedSumDataName 2 2) `appE` conE '()) +foo2 $(conP (unboxedSumDataName 2 2) [conP '() []]) = (# | () #) |