Commit a6fb4122 authored by Axel Simon's avatar Axel Simon

make compile

parent 6f563dc5
...@@ -100,13 +100,13 @@ structure DesugaredTree = struct ...@@ -100,13 +100,13 @@ structure DesugaredTree = struct
in in
case p of case p of
IDpat x => Pat.CON (s, SOME x) IDpat x => Pat.CON (s, SOME x)
| _ => raise DesugarException | _ => raise DesugarTreeException
(sp, "expect variable as argument in constructor pattern") (sp, "expect variable as argument in constructor pattern")
end end
| CONpat (s, NONE) => Pat.CON (s, NONE) | CONpat (s, NONE) => Pat.CON (s, NONE)
| LITpat (INTlit i) => Pat.INT i | LITpat (INTlit i) => Pat.INT i
| LITpat (VEClit i) => Pat.BIT i | LITpat (VEClit i) => Pat.BIT i
| LITpat _ => raise DesugarException | LITpat _ => raise DesugarTreeException
(sp, "cannot pattern match against this literal") (sp, "cannot pattern match against this literal")
| IDpat id => Pat.ID id | IDpat id => Pat.ID id
| WILDpat => Pat.WILD | WILDpat => Pat.WILD
......
...@@ -165,14 +165,14 @@ end = struct ...@@ -165,14 +165,14 @@ end = struct
set set
end end
(*fun meetVarImpliesVar (BVAR v1, BVAR v2) f = f fun meetVarImpliesVar (BVAR v1, BVAR v2) f = f
fun meetNotBoth (BVAR v1, BVAR v2, f) = f fun meetNotBoth (BVAR v1, BVAR v2, f) = f
fun meetEither (BVAR v1, BVAR v2, f) = f fun meetEither (BVAR v1, BVAR v2, f) = f
fun meetEqual (BVAR v1, BVAR v2, f) = f fun meetEqual (BVAR v1, BVAR v2, f) = f
fun meetVarOne (BVAR v) f = f fun meetVarOne (BVAR v) f = f
fun meetVarZero (BVAR v) f = f*) fun meetVarZero (BVAR v) f = f
fun meetVarImpliesVar (BVAR v1, BVAR v2) f = ( (*fun meetVarImpliesVar (BVAR v1, BVAR v2) f = (
(*TextIO.print ("meet with " ^ i v1 ^ " -> " ^ i v2 ^ "\n");*) (*TextIO.print ("meet with " ^ i v1 ^ " -> " ^ i v2 ^ "\n");*)
if v1=v2 then f else addClause ((~v1,v2), f) if v1=v2 then f else addClause ((~v1,v2), f)
handle Unsatisfiable set => handle Unsatisfiable set =>
...@@ -202,7 +202,7 @@ end = struct ...@@ -202,7 +202,7 @@ end = struct
addUnits ([~v], f) addUnits ([~v], f)
handle Unsatisfiable set => handle Unsatisfiable set =>
raise Unsatisfiable (getRelated (IS.add' (v,set),f)) raise Unsatisfiable (getRelated (IS.add' (v,set),f))
) )*)
fun resolve ([], (us, cs)) = (us, cs) fun resolve ([], (us, cs)) = (us, cs)
| resolve (v :: vs, (us, cs)) = | resolve (v :: vs, (us, cs)) =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment