blob: 09b2467fccd22c634f8c68b188e4e251135c29c6 (
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
|