summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/tcrun050.hs
blob: a40134843955cea38b029242893a8f4035f7bd91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE UnboxedTuples #-}

module Main where

type T a = Int -> (# Int, Int #)

{-# NOINLINE g #-}
--g :: (# Int, Int #) -> (# Int, Int #)
g t =  case t of r -> (r :: (# Int, Int #)) 

{-# NOINLINE f #-}
f :: T a -> T a
f t = \x -> case t x of r -> r


main = print $ case f (\x -> g (# x, x + 1 #)) 10 of (# y, z #) -> y + z