Commit aa8e327d authored by Axel Simon's avatar Axel Simon

be generous about zipEq errors being follow up errors during type inference

parent 51e6e497
...@@ -258,8 +258,12 @@ fun typeInferencePass (errStrm, ti : TI.type_info, ast) = let ...@@ -258,8 +258,12 @@ fun typeInferencePass (errStrm, ti : TI.type_info, ast) = let
fun reportError conv ({span,component=comp}, env) {span=s, tree=t} = fun reportError conv ({span,component=comp}, env) {span=s, tree=t} =
conv ({span=s,component=comp},env) t conv ({span=s,component=comp},env) t
handle (S.UnificationFailure str) => handle
(Error.errorAt (errStrm, s, [str]); raise TypeError) (S.UnificationFailure str) =>
(Error.errorAt (errStrm, s, [str]); raise TypeError)
| ListPair.UnequalLengths =>
(Error.warningAt (errStrm, s, ["supressed follow-up error"]); raise TypeError)
val reportBadSizes = List.app (fn (s,str) => Error.errorAt (errStrm, s, [str])) val reportBadSizes = List.app (fn (s,str) => Error.errorAt (errStrm, s, [str]))
fun getSpan {span = s,component} = s fun getSpan {span = s,component} = s
fun hasSymbol ({span, component = SCC.SIMPLE n},s) = SymbolTable.eq_symid (s,n) fun hasSymbol ({span, component = SCC.SIMPLE n},s) = SymbolTable.eq_symid (s,n)
......
...@@ -125,7 +125,10 @@ end = struct ...@@ -125,7 +125,10 @@ end = struct
{terms = List.map (fn (f,v) => (Int.quot (f,d),v)) ts, {terms = List.map (fn (f,v) => (Int.quot (f,d),v)) ts,
const = Int.quot (c,d)} const = Int.quot (c,d)}
end end
(*fun add (eq,scs) = RESULT ([],scs)
fun fromList eqs = empty*)
fun add (eq,scs) = fun add (eq,scs) =
let let
fun inline (sc as {terms = (f,v) :: _, const = n2}, eq) = fun inline (sc as {terms = (f,v) :: _, const = n2}, eq) =
......
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