X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=funcdeps%2Ftest.icl;fp=funcdeps%2Ftest.icl;h=f9ef7647cc13a202af6552de729ee9de5b9e43fd;hb=f97a5bd0b5f76a04c484555f7ff16b0f3ba152bb;hp=5a035458d3fef44f41bfd0cf142c1465ba178b6b;hpb=9d093d11da012724253e1a3b31d3f1af94b4e1bd;p=clean-tests.git diff --git a/funcdeps/test.icl b/funcdeps/test.icl index 5a03545..f9ef764 100644 --- a/funcdeps/test.icl +++ b/funcdeps/test.icl @@ -3,16 +3,20 @@ module test import StdMisc :: Zero = Zero -:: Succ a = Succ - +:: Succ a = Succ a :: Ar3 a b c :== (a -> b -> c) -class C m :: (m b) - -instance C ((->) a) where C = \x->undef +class succ a ~b :: a -> b +instance succ Zero (Succ Zero) where succ Zero = Succ Zero +instance succ a (Succ a) where succ a = Succ a -Start :: (a -> b -> c) -Start = t +class plus a b | succ a b :: a b +instance plus Zero a a +where + plus a b = b +instance plus (Succ a) b c | plus a (Succ b) c +where + plus (Succ a) b = plus a (Succ b) -t :: (Ar3 a b c) -t = C +Start :: Int +Start = 42