coreclean.dcl 1.43 KB
Newer Older
1
2
3
4
definition module coreclean

// $Id$

5
6
from strat import Strategy
from rule import Rule
7
from syntax import TypeSymbIdent,Ident,TypeVar,ExprInfoPtr,VarInfoPtr
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
8
9

// Transitive necessities
10
11
12
from strat import Substrategy
from spine import Spine,Subspine
from graph import Graph,Node
13
from syntax import SymbolPtr,SymbolTableEntry,STE_Kind,Index,Level,Global,TypeSymbProperties,SignClassification,PropClassification,TypeVarInfoPtr,TypeVarInfo,ExprInfo,VarInfo
14
from general import BITVECT
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
15
from Heap import Ptr,PtrN,HeapN
16
from StdOverloaded import ==
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
17
18
from StdString import String

19
:: SuclTypeSymbol
20
21
22
23
 = SuclUSER TypeSymbIdent   // A user-defined type symbol
 | SuclFN Int               // THE function type for a function with specified arity
 | SuclINT                  // Built-in integer
 | SuclCHAR                 // Etc.
24
25
26
27
28
 | SuclREAL
 | SuclBOOL
 | SuclDYNAMIC
 | SuclFILE
 | SuclWORLD
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
29

30
:: SuclTypeVariable
31
32
33
34
 = SuclANONYMOUS Int
 | SuclNAMED TypeVar

sucltypeheap :: [SuclTypeVariable]
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
35

36
:: SuclSymbol
37
38
 = SuclUser SymbolPtr
 | SuclCase ExprInfoPtr
39
 | SuclApply Int
40
 | SuclInt Int
41
 | SuclReal Real
42
 | SuclBool Bool
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
43

44
:: SuclSymbolKind
45
46
47
 = SuclFunction
 | SuclConstructor
 | SuclPrimitive
Vincent Zweije's avatar
Refine    
Vincent Zweije committed
48

49
:: SuclVariable
50
51
52
 = SuclAnonymous Int
 | SuclNamed VarInfoPtr

53
54
55
suclheap :: [SuclVariable]

instance == SuclSymbol
56
instance == SuclVariable
57
58
59

// Get the type rule and strictness of a built in core clean symbol
coretypeinfo :: SuclSymbol -> (Rule SuclTypeSymbol SuclTypeVariable,[Bool])