summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/T12478_5.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/T12478_5.hs')
-rw-r--r--tests/examples/ghc86/T12478_5.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/examples/ghc86/T12478_5.hs b/tests/examples/ghc86/T12478_5.hs
new file mode 100644
index 0000000..5919aab
--- /dev/null
+++ b/tests/examples/ghc86/T12478_5.hs
@@ -0,0 +1,18 @@
+{-# 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 '() []]) = (# | () #)
+