@@ -1628,14 +1628,14 @@ addImpl' inpat env infns imp_meths ist ptm
16281628aiFn :: Bool -> Bool -> Bool -> [Name] -> IState -> FC -> Name -> FC -> [[T.Text]] -> [PArg] -> Either Err PTerm
16291629aiFn inpat True qq imp_meths ist fc f ffc ds []
16301630 = case lookupDef f (tt_ctxt ist) of
1631− [] -> Right $ PPatvar fc f
1631+ [] -> Right $ PPatvar ffc f
16321632 alts -> let ialts = lookupCtxtName f (idris_implicits ist) in
16331633 -- trace (show f ++ " " ++ show (fc, any (all imp) ialts, ialts, any constructor alts)) $
16341634 if (not (vname f) || tcname f
16351635 || any (conCaf (tt_ctxt ist)) ialts)
16361636-- any constructor alts || any allImp ialts))
1637− then aiFn inpat False qq imp_meths ist fc f fc ds [] -- use it as a constructor
1638− else Right $ PPatvar fc f
1637+ then aiFn inpat False qq imp_meths ist fc f ffc ds [] -- use it as a constructor
1638+ else Right $ PPatvar ffc f
16391639 where imp (PExp _ _ _ _) = False
16401640 imp _ = True
16411641-- allImp [] = False