author | berghofe |
Wed, 07 Feb 2007 17:30:53 +0100 | |
changeset 22264 | 6a65e9b2ae05 |
parent 22188 | a63889770d57 |
child 22386 | 4ebe883b02ff |
permissions | -rw-r--r-- |
21147 | 1 |
structure ROOT = |
2 |
struct |
|
3 |
||
4 |
structure Orderings = |
|
5 |
struct |
|
6 |
||
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
7 |
type 'a ord = |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
8 |
{Orderings__less_eq : 'a -> 'a -> bool, |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
9 |
Orderings__less : 'a -> 'a -> bool}; |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
10 |
fun less_eq (A_:'a ord) = #Orderings__less_eq A_; |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
11 |
fun less (A_:'a ord) = #Orderings__less A_; |
21147 | 12 |
|
13 |
end; (*struct Orderings*) |
|
14 |
||
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
15 |
structure Code_Generator = |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
16 |
struct |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
17 |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
18 |
type 'a eq = {Code_Generator__op_eq : 'a -> 'a -> bool}; |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
19 |
fun op_eq (A_:'a eq) = #Code_Generator__op_eq A_; |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
20 |
|
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
21 |
end; (*struct Code_Generator*) |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
22 |
|
21147 | 23 |
structure Codegen = |
24 |
struct |
|
25 |
||
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
26 |
fun less_eq_prod (A1_, A2_) B_ (x1, y1) (x2, y2) = |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
27 |
Orderings.less A2_ x1 x2 orelse |
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
28 |
Code_Generator.op_eq A1_ x1 x2 andalso Orderings.less_eq B_ y1 y2; |
21147 | 29 |
|
30 |
end; (*struct Codegen*) |
|
31 |
||
32 |
end; (*struct ROOT*) |