mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 20:51:43 +03:00
[ perf ] Move unnecessary toFullNames
calls under a logC
(#1423)
Fixed by converting the name of the equality type constructor to a resolved name so that unresolved names do not show up in the unifier.
This commit is contained in:
parent
11761daa76
commit
d97f5266de
@ -1157,9 +1157,10 @@ mutual
|
||||
(NDCon xfc x tagx ax xs)
|
||||
(NDCon yfc y tagy ay ys)
|
||||
unifyNoEta mode loc env (NTCon xfc x tagx ax xs) (NTCon yfc y tagy ay ys)
|
||||
= do x <- toFullNames x
|
||||
y <- toFullNames y
|
||||
log "unify" 20 $ "Comparing type constructors " ++ show x ++ " and " ++ show y
|
||||
= do logC "unify" 20 $ do
|
||||
x <- toFullNames x
|
||||
y <- toFullNames y
|
||||
pure $ "Comparing type constructors " ++ show x ++ " and " ++ show y
|
||||
if x == y
|
||||
then do let xs = map snd xs
|
||||
let ys = map snd ys
|
||||
|
@ -596,7 +596,7 @@ checkClause {vars} mult vis totreq hashit n opts nest env
|
||||
let eqName = NS builtinNS (UN "Equal")
|
||||
Just (TCon t ar _ _ _ _ _ _) <- lookupDefExact eqName (gamma defs)
|
||||
| _ => throw (InternalError "Cannot find builtin Equal")
|
||||
let eqTyCon = Ref vfc (TyCon t ar) eqName
|
||||
let eqTyCon = Ref vfc (TyCon t ar) !(toResolvedNames eqName)
|
||||
|
||||
let wargn : Name
|
||||
wargn = MN "warg" 0
|
||||
|
Loading…
Reference in New Issue
Block a user