.
[clean-tests.git] / fundeps / test.icl
index 8d8fc11..034a2e8 100644 (file)
@@ -1,7 +1,7 @@
 module test
 
 import qualified StdEnv
-import StdEnv => qualified isEven, isOdd, class toInt(toInt), instance toInt Int
+import StdEnv => qualified isEven, isOdd, class toInt(..), instance toInt Int, class toString(..)
 
 :: Zero = Zero
 :: Succ a = Succ
@@ -82,6 +82,17 @@ repeat a = let r = Vec (createArray (toInt (length r)) a) in r
 append :: (Vec n a) (Vec m a) -> Vec x a | Add n m x
 append (Vec a) (Vec b) = Vec (a +++ b)
 
+<<<<<<< HEAD
+//Start = nrepeat (Three :*: Three) 'a'
+
+v1 :: Vec (Succ (Succ Zero)) Int
+v1 = append (single 1) (single 32)
+
+v2 :: Vec Three Int
+v2 = repeat 5
+
+=======
+>>>>>>> 7675818dc8fc41eaf864dc89a8c2ce62c7dae93f
 class Le a b ~c
 where
        le :: a b -> c
@@ -105,6 +116,30 @@ instance toInt (Succ n) | toInt n where toInt a = inc (toInt (dec a))
 :: A = A; :: B = B; :: C = C; :: D = D; :: E = E; :: F = F; :: G = G; :: H = H;
 :: I = I; :: J = J; :: K = K; :: L = L; :: M = M; :: N = N; :: O = O; :: P = P;
 :: Q = Q; :: R = R; :: S = S; :: T = T; :: U = U; :: V = V; :: W = W; :: X = X;
+<<<<<<< HEAD
+:: Y = Y; :: Z = Z; :: Spc = Spc
+:: Nl = Nl
+:: SC l r = SC
+
+:: Cons x xs = Cons
+class HConcat a b ~c
+where
+       hconcat :: a b -> c
+       hconcat _ _ = undef
+instance HConcat () a a
+instance HConcat (Cons x xs) ys (Cons x zs) | HConcat xs ys zs
+
+:: FooS :== Cons F (Cons O (Cons O ()))
+FooS :: FooS
+FooS = undef
+:: BarS :== Cons B (Cons A (Cons A ()))
+BarS :: BarS
+BarS = undef
+
+:: NilS :== ()
+NilS :: NilS
+NilS = undef
+=======
 :: Y = Y; :: Z = Z;
 :: Nul = Nul
 :: SC l r = SC
@@ -116,3 +151,4 @@ e1 = append (single 1) (single 32)
 
 e2 :: Vec Three Int
 e2 = repeat 5
+>>>>>>> 7675818dc8fc41eaf864dc89a8c2ce62c7dae93f