Verified Commit c33c0c2d authored by Camil Staps's avatar Camil Staps
Browse files

Fix crash on some universally quantified searches

parent fe58c64c
......@@ -58,8 +58,8 @@ addType loc t tree=:(Node n locs children)
findUnifyingLocations :: !Type !TypeTree -> [Location]
findUnifyingLocations t tree=:(Node n ls cs) = case unify t n of
Nothing -> []
Just tvas -> if (not (isEmpty cs) && isGeneralisingUnifier tvas)
(allLocs tree)
Just tvas -> //if (not (isEmpty cs) && isGeneralisingUnifier tvas)
//(allLocs tree) // TODO this fails for A.a: a, which incorrectly generalises 'a' and returns all types
(ls ++ concatMap (findUnifyingLocations t) cs)
allTypes :: TypeTree -> [(Type,[Location],[TypeTree])]
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