diff options
Diffstat (limited to 'testsuite/tests/unboxedsums/UnboxedSumsTH_Fail.hs')
-rw-r--r-- | testsuite/tests/unboxedsums/UnboxedSumsTH_Fail.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/unboxedsums/UnboxedSumsTH_Fail.hs b/testsuite/tests/unboxedsums/UnboxedSumsTH_Fail.hs new file mode 100644 index 0000000000..46ed1c13c1 --- /dev/null +++ b/testsuite/tests/unboxedsums/UnboxedSumsTH_Fail.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE UnboxedSums #-} + +module UnboxedSumsTH_Fail where + +import Data.Proxy +import Language.Haskell.TH + +-- (# | #) is not a valid data constructor, +-- as it doesn't indicate which alternative we are taking. +testDC :: (# Integer | Bool #) +testDC = $( conE '(# | #) `appE` litE (IntegerL 77) ) |