Mercurial > urweb
comparison src/disjoint.sml @ 478:6ee1c761818f
Some small changes while failing to write [restrict]
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 08 Nov 2008 13:15:00 -0500 |
parents | b85e6ba56618 |
children | 8998114760c1 |
comparison
equal
deleted
inserted
replaced
477:667c0e54632a | 478:6ee1c761818f |
---|---|
51 | RowN n => "RowN(" ^ Int.toString n ^ ")" | 51 | RowN n => "RowN(" ^ Int.toString n ^ ")" |
52 | RowM (n, _, s) => "RowR(" ^ Int.toString n ^ ", " ^ s ^ ")" | 52 | RowM (n, _, s) => "RowR(" ^ Int.toString n ^ ", " ^ s ^ ")" |
53 | 53 |
54 fun pp p = print (p2s p ^ "\n") | 54 fun pp p = print (p2s p ^ "\n") |
55 | 55 |
56 fun rp2s (p, ns) = String.concatWith " " (p2s p :: map Int.toString ns) | |
57 | |
56 structure PK = struct | 58 structure PK = struct |
57 | 59 |
58 type ord_key = piece | 60 type ord_key = piece |
59 | 61 |
60 open Order | 62 open Order |
102 structure PS = BinarySetFn(PK) | 104 structure PS = BinarySetFn(PK) |
103 structure PM = BinaryMapFn(PK) | 105 structure PM = BinaryMapFn(PK) |
104 | 106 |
105 type env = PS.set PM.map | 107 type env = PS.set PM.map |
106 | 108 |
109 fun p_env x = | |
110 (print "\nDENV:\n"; | |
111 PM.appi (fn (p1, ps) => | |
112 PS.app (fn p2 => | |
113 print (rp2s p1 ^ " ~ " ^ rp2s p2 ^ "\n")) ps) x) | |
114 | |
107 structure E = ElabEnv | 115 structure E = ElabEnv |
108 | 116 |
109 type goal = ErrorMsg.span * E.env * env * Elab.con * Elab.con | 117 type goal = ErrorMsg.span * E.env * env * Elab.con * Elab.con |
110 | 118 |
111 val empty = PM.empty | 119 val empty = PM.empty |