aboutsummaryrefslogtreecommitdiff
path: root/frontend/general.icl
diff options
context:
space:
mode:
authoralimarin2002-04-11 10:01:50 +0000
committeralimarin2002-04-11 10:01:50 +0000
commit8a32b21c043f21cf197cdde3a02ead110302b008 (patch)
tree3711960083237a1e23b69a705e26d0a1f725d308 /frontend/general.icl
parent- removed strictness annotations (diff)
support for generic type context like in
foo :: a a -> Bool | eq{|*|} a git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1073 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/general.icl')
-rw-r--r--frontend/general.icl11
1 files changed, 11 insertions, 0 deletions
diff --git a/frontend/general.icl b/frontend/general.icl
index 3506334..cd25cbc 100644
--- a/frontend/general.icl
+++ b/frontend/general.icl
@@ -67,6 +67,17 @@ where
= val
= halt
+// Strict version of --->, which evaluates its lhs first
+(<---) infix :: !.a !b -> .a | <<< b
+(<---) value message = value ---> message
+
+// Tracing evaluation of a value, otherwise acts like identity
+traceValue :: !String !String .a -> .a
+traceValue contextdesc valuedesc value
+= (value <--- (contextdesc+++" <<== "+++valuedesc)) ---> (contextdesc+++" ==>> "+++valuedesc)
+
+
+
(-?->) infix :: .a !(!Bool, !b) -> .a | <<< b
(-?->) val (cond, message)
| cond