tcrun041.hs 665 Bytes
Newer Older
1
{-# LANGUAGE TupleSections, UnboxedTuples #-}
batterseapower's avatar
batterseapower committed
2
3
4
5
6
7
8
9
10
11
12
13
14
module Main where

a :: Int -> (Int, Bool)
a = ( , True)

b :: Bool -> (Int, Bool)
b = (1, )

c :: a -> (a, Bool)
c = (, True || False)

d = (,1,)

15
16
17
18
19
20
21
22
23

e = (# , True #)

f = (# 1, #)

g = (# , True || False #)

h = (# ,1, #)

24
25
26
27
28

unchanged :: a -> (# Int #)
unchanged _binding = (# #) 1


29
30
31
32
33
34
35
36
37
main = do
    print (a 1, b False, c "Hello", c 1337, d "Yeah" "Baby")
    case e 1 of { (# x1, x2 #) ->
    case f False of { (# x3, x4 #) ->
    case g "Hello" of { (# x5, x6 #) ->
    case g 1337 of { (# x7, x8 #) ->
    case h "Yeah" "Baby" of { (# x9, x10, x11 #) ->
    print (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11) }}}}}