aboutsummaryrefslogtreecommitdiff
path: root/sucl/trd.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'sucl/trd.dcl')
-rw-r--r--sucl/trd.dcl23
1 files changed, 23 insertions, 0 deletions
diff --git a/sucl/trd.dcl b/sucl/trd.dcl
new file mode 100644
index 0000000..bfe91b4
--- /dev/null
+++ b/sucl/trd.dcl
@@ -0,0 +1,23 @@
+definition module trd
+
+from rule import Rule
+from graph import Node
+from StdOverloaded import ==
+
+/*
+`Ruletype theap symtype rule' determines the type of `rule'.
+`Theap' must be an endless supply of type variables.
+`Symtype' associates type rules with the symbols that occur in `rule'.
+
+If typing does not succeed, the function aborts.
+*/
+
+ruletype
+ :: .[tvar]
+ ((Node sym var) -> .Rule tsym trvar)
+ .(Rule sym var)
+ -> .Rule tsym tvar
+ | == var
+ & == tsym
+ & == tvar
+ & == trvar