on master help sign in
Fix name disambiguation bug in pruneByType by normalising types
commitba6de835037944adf06f396fa45d3a99f6bc5b1d authorEdwin Brady <ecb10@st-andrews.ac.uk> dateThu 14 Mar 2013, 17:04 (14 years ago) parent5aa46ad
1 file changed+2−1
src/Idris/ElabTerm.hs+2−1
src/Idris/ElabTerm.hs+2−1
@@ -537,7 +537,8 @@ pruneByType (P _ n _) c as
537537
538538 typeHead var f f'
539539 = case lookupTy Nothing f' c of
540− [ty] -> case unApply (getRetTy ty) of
540+ [ty] -> let ty' = normalise c [] ty in
541+ case unApply (getRetTy ty') of
541542 (P _ ftyn _, _) -> ftyn == f
542543 (V _, _) -> var -- keep, variable
543544 _ -> False