author | wenzelm |
Thu, 19 Jul 2007 23:18:46 +0200 | |
changeset 23862 | b1861768d8f4 |
parent 23850 | f1434532a562 |
child 24193 | 926dde4d96de |
permissions | -rw-r--r-- |
23250 | 1 |
structure HOL = |
2 |
struct |
|
3 |
||
4 |
type 'a eq = {eq : 'a -> 'a -> bool}; |
|
5 |
fun eq (A_:'a eq) = #eq A_; |
|
6 |
||
7 |
end; (*struct HOL*) |
|
8 |
||
21147 | 9 |
structure Orderings = |
10 |
struct |
|
11 |
||
22386 | 12 |
type 'a ord = {less_eq : 'a -> 'a -> bool, less : 'a -> 'a -> bool}; |
13 |
fun less_eq (A_:'a ord) = #less_eq A_; |
|
14 |
fun less (A_:'a ord) = #less A_; |
|
21147 | 15 |
|
16 |
end; (*struct Orderings*) |
|
17 |
||
18 |
structure Codegen = |
|
19 |
struct |
|
20 |
||
23107 | 21 |
fun less_eq_product (A1_, A2_) B_ (x1, y1) (x2, y2) = |
22188
a63889770d57
adjusted manual to improved treatment of overloaded constants
haftmann
parents:
22015
diff
changeset
|
22 |
Orderings.less A2_ x1 x2 orelse |
23250 | 23 |
HOL.eq A1_ x1 x2 andalso Orderings.less_eq B_ y1 y2; |
21147 | 24 |
|
25 |
end; (*struct Codegen*) |