blob: f1492c3c9cebe62497882a044182f87d807c68c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
definition module trd
// $Id$
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
|