diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-02-21 21:23:40 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-20 07:48:38 -0400 |
commit | 95275a5f25a2e70b71240d4756109180486af1b1 (patch) | |
tree | eb4801bb0e00098b8b9d513479de4fbbd779ddac /testsuite/tests/printer/Test12417.hs | |
parent | f940fd466a86c2f8e93237b36835797be3f3c898 (diff) | |
download | haskell-95275a5f25a2e70b71240d4756109180486af1b1.tar.gz |
GHC Exactprint main commit
Metric Increase:
T10370
parsing001
Updates haddock submodule
Diffstat (limited to 'testsuite/tests/printer/Test12417.hs')
-rw-r--r-- | testsuite/tests/printer/Test12417.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/printer/Test12417.hs b/testsuite/tests/printer/Test12417.hs new file mode 100644 index 0000000000..67da7f2107 --- /dev/null +++ b/testsuite/tests/printer/Test12417.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE UnboxedSums, MagicHash #-} + +module Test12417 where + +import GHC.Prim +import GHC.Types + +import System.Mem (performMajorGC) + +type Either1 a b = (# a | b #) + +showEither1 :: (Show a, Show b) => Either1 a b -> String +showEither1 (# left | #) = "Left " ++ show left +showEither1 (# | right #) = "Right " ++ show right + +type T = (# Int | Bool | String | Char | Either Int Bool | Int# | Float# #) + +showEither4 :: T -> String +showEither4 (# | b | | | | | #) = "Alt1: " ++ show b |