-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol.polyrec.sig
144 lines (132 loc) · 4.29 KB
/
control.polyrec.sig
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
(* File control.polyrec.sig, a modification (by Hans Leiss, June 2023) of
*
* base/compiler/TopLevel/main/control.sig
* COPYRIGHT (c) 2019 The Fellowship of SML/NJ (http://www.smlnj.org)
*
* This modification adds function declarations
*
* - val usemono,usepoly : unit -> unit to CONTROL
*
* to allow the SML/NJ type checker to switch between monomorphic and
* polymorphic recursion (i.e. Damas/Milner vs. Milner/Mycroft type system).
*
* The user controls the type checker via Control.usemono and Control.usepoly.
* These update the flag Elab.oldchecker of structure Elab : ELABCONTROL.
*
*)
(* match compiler controls *)
signature MCCONTROL =
sig
val debugging : bool ref
val printArgs : bool ref
val printRet : bool ref
val bindNoVariableWarn : bool ref
val bindNonExhaustiveWarn : bool ref
val bindNonExhaustiveError : bool ref
val matchNonExhaustiveWarn : bool ref
val matchNonExhaustiveError : bool ref
val matchRedundantWarn : bool ref
val matchRedundantError : bool ref
end (* signature MCCONTROL *)
(* general code-generation controls *)
signature CGCONTROL =
sig
val closureStrategy : int ref
val cpsopt : string list ref (* list of cpsopt phases *)
val rounds : int ref
val betacontract : bool ref
val eta : bool ref
val selectopt : bool ref
val dropargs : bool ref
val deadvars : bool ref
val flattenargs : bool ref
val extraflatten : bool ref
val switchopt : bool ref
val handlerfold : bool ref
val branchfold : bool ref
val arithopt : bool ref
val betaexpand : bool ref
val unroll : bool ref
val invariant: bool ref
val lambdaprop: bool ref
val boxedconstconreps : bool ref
val sharepath : bool ref
val staticprof : bool ref
val unroll_recur : bool ref
val debugcps : bool ref
val bodysize : int ref
val reducemore : int ref
val comment : bool ref (* used in CPS/clos/closure.sml to control debug messages *)
val knownGen : int ref
val knownClGen : int ref
val escapeGen : int ref
val calleeGen : int ref
val spillGen : int ref
val etasplit : bool ref
val uncurry : bool ref
val ifidiom : bool ref
val comparefold : bool ref
val debugLits : bool ref
val newLiterals : bool ref
val debugRep : bool ref
val deadup : bool ref
val memDisambiguate : bool ref (* used by MLRISC *)
val printit : bool ref
val printClusters : bool ref
end (* signature CGCONTROL *)
(* main Control structure *)
signature CONTROL =
sig
structure Print : PRINTCONTROL
structure ElabData : ELABDATA_CONTROL
structure Elab : ELAB_CONTROL (* extended by
val oldchecker : bool ref
val viewsemi : int ref
val showsemi : {Var, Rule, Valrec, Step : int ref} *)
structure MC : MCCONTROL
structure FLINT : FLINTCONTROL
structure CG : CGCONTROL
structure MLRISC : MLRISC_CONTROL
val debugging : bool ref
val printAst : bool ref
val printAbsyn : bool ref
include BASIC_CONTROL
(* provides: val printWarnings : bool ref
*)
include PARSER_CONTROL
(* provides: val primaryPrompt : string ref
val secondaryPrompt : string ref
val overloadKW : bool ref
val lazysml : bool ref
val quotation : bool ref
*)
val usemono : unit -> unit
val usepoly : unit -> unit
val interp : bool ref
(* turn on interpreter -- defunct *)
val progressMsgs : bool ref
(* turn on printing of progress messages at end of major stages *)
val saveLambda : bool ref
val preserveLvarNames : bool ref
val trackExn : bool ref
val polyEqWarn : bool ref
val saveit : bool ref
val saveAbsyn : bool ref
val saveConvert : bool ref
val saveCPSopt : bool ref
val saveClosure : bool ref
structure LambdaSplitting : sig
datatype globalsetting
= Off (* completely disabled *)
| Default of int option (* default aggressiveness; NONE: off *)
type localsetting = int option option
val UseDefault : localsetting
val Suggest : int option -> localsetting
val set : globalsetting -> unit
val get : unit -> int option
val get' : localsetting -> int option
val parse : string -> globalsetting option
val show : globalsetting -> string
end
val tdp_instrument : bool ref
end (* signature CONTROL *)