[project @ 1997-07-27 09:27:45 by sof]
[ghc-hetmet.git] / ghc / compiler / tests / deSugar / cvh-ds-unboxed / Life2.lhs
1 \section{Life2}
2
3 \begin{code}
4 module Life2 (life2) where 
5 import UTypes
6 import UCopy (copy_FI)
7
8 life2 itLimit boardSize
9  = (fBStr firstBoard) ++ (fBStr secondBoard)
10    where {- ... -}
11
12 \end{code}
13
14 \begin{code}
15    fBStr :: FI -> String
16    fBStr FIN = []
17
18 {- OK
19    firstBoard :: FI
20    firstBoard = copy_FI boardSize (case 0 of
21                                     (MkInt x) -> x)
22 -}
23
24 {- not happy about this -}
25    
26    firstBoard = copy_FI boardSize u0
27    u0 = unBoxInt 0
28    unBoxInt (MkInt x) = x
29 {- end of not happy -}
30
31 {- not happy with this either! -}
32
33    secondBoard = copy_FI boardSize u1
34
35    (MkInt u1) = 0
36 {- end of second not happy -}
37 \end{code}
38
39