on master help sign in
Use exact lookup in size-change checking

We should always use exact name lookup after ambiguities are resolved.

commitc931e38419f67dd4134f6b7d69ff30274b790660 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 22 Apr 2016, 13:23 (11 years ago) parentb57da9d
1 file changed+3−3
src/Idris/Coverage.hs+3−3
src/Idris/Coverage.hs+3−3
@@ -668,9 +668,9 @@ checkMP ist i mp = if i > 0
668668 -- if we get to a constructor, it's fine as long as it's strictly positive
669669 tryPath desc path ((f, _) : es) arg
670670 | [TyDecl (DCon _ _ _) _] <- lookupDef f (tt_ctxt ist)
671− = case lookupTotal f (tt_ctxt ist) of
672− [Total _] -> Unchecked -- okay so far
673− [Partial _] -> Partial (Other [f])
671+ = case lookupTotalExact f (tt_ctxt ist) of
672+ Just (Total _) -> Unchecked -- okay so far
673+ Just (Partial _) -> Partial (Other [f])
674674 x -> error $ "CAN'T HAPPEN: " ++ show x ++ " for " ++ show f
675675 | [TyDecl (TCon _ _) _] <- lookupDef f (tt_ctxt ist)
676676 = Total []