Update Trac ticket URLs to point to GitLab
[ghc.git] / testsuite / tests / unboxedsums / unboxedsums10.hs
1 {-# LANGUAGE UnboxedSums, MagicHash #-}
2
3 module Main where
4
5 type Ty = (# (Int -> Int) | (Int -> Int) #)
6
7 {-# NOINLINE apply #-}
8 apply :: Ty -> Int
9 apply (# f | #) = f 0
10 apply (# | f #) = f 1
11
12 main :: IO ()
13 main = do
14 print (apply (# (\x -> x * 2) | #))
15 print (apply (# | (\x -> x * 3) #))