| author | narboux |
| Mon, 21 May 2007 19:14:12 +0200 | |
| changeset 23065 | ab28e8398670 |
| parent 22479 | de15ea8fb348 |
| child 23107 | 0c3c55b7c98f |
| permissions | -rw-r--r-- |
| 21147 | 1 |
structure ROOT = |
2 |
struct |
|
3 |
||
4 |
structure Orderings = |
|
5 |
struct |
|
6 |
||
| 22386 | 7 |
type 'a ord = {less_eq : 'a -> 'a -> bool, less : 'a -> 'a -> bool};
|
8 |
fun less_eq (A_:'a ord) = #less_eq A_; |
|
9 |
fun less (A_:'a ord) = #less A_; |
|
| 21147 | 10 |
|
11 |
end; (*struct Orderings*) |
|
12 |
||
|
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
13 |
structure Code_Generator = |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
14 |
struct |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
15 |
|
| 22386 | 16 |
type 'a eq = {op_eq : 'a -> 'a -> bool};
|
17 |
fun op_eq (A_:'a eq) = #op_eq A_; |
|
|
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
18 |
|
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
19 |
end; (*struct Code_Generator*) |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
20 |
|
| 21147 | 21 |
structure Codegen = |
22 |
struct |
|
23 |
||
| 22479 | 24 |
fun less_eq_times (A1_, A2_) B_ (x1, y1) (x2, y2) = |
|
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
25 |
Orderings.less A2_ x1 x2 orelse |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
26 |
Code_Generator.op_eq A1_ x1 x2 andalso Orderings.less_eq B_ y1 y2; |
| 21147 | 27 |
|
28 |
end; (*struct Codegen*) |
|
29 |
||
30 |
end; (*struct ROOT*) |