blob: 30de1a378275a4df4abb2e275cbac827c0385ff3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
\section{Life2}
\begin{code}
module Life2 (life2) where
import UTypes
import UCopy (copy_FI)
life2 itLimit boardSize
= (fBStr firstBoard) ++ (fBStr secondBoard)
where {- ... -}
\end{code}
\begin{code}
fBStr :: FI -> String
fBStr FIN = []
{- OK
firstBoard :: FI
firstBoard = copy_FI boardSize (case 0 of
(MkInt x) -> x)
-}
{- not happy about this -}
firstBoard = copy_FI boardSize u0
u0 = unBoxInt 0
unBoxInt (MkInt x) = x
{- end of not happy -}
{- not happy with this either! -}
secondBoard = copy_FI boardSize u1
(MkInt u1) = 0
{- end of second not happy -}
\end{code}
|