summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/T12478_5.hs
blob: 5919aabf266cb8f2151092537d7289c40bff206e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 '() []]) = (# | () #)