repositories
/
clean-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a11
[clean-tests.git]
/
funcdeps
/
test.icl
diff --git
a/funcdeps/test.icl
b/funcdeps/test.icl
index
5a03545
..
f9ef764
100644
(file)
--- a/
funcdeps/test.icl
+++ b/
funcdeps/test.icl
@@
-3,16
+3,20
@@
module test
import StdMisc
:: Zero = Zero
import StdMisc
:: Zero = Zero
-:: Succ a = Succ
-
+:: Succ a = Succ a
:: Ar3 a b c :== (a -> b -> c)
:: 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