[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / deSugar / cvh-ds-unboxed / Life2.lhs
diff --git a/ghc/compiler/tests/deSugar/cvh-ds-unboxed/Life2.lhs b/ghc/compiler/tests/deSugar/cvh-ds-unboxed/Life2.lhs
new file mode 100644 (file)
index 0000000..30de1a3
--- /dev/null
@@ -0,0 +1,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}
+
+