@@ -449,9 +449,12 @@ displayWarnings est
449449 = mapM_ displayImpWarning (implicit_warnings est)
450450 where
451451 displayImpWarning :: (FC, Name) -> Idris ()
452− displayImpWarning (fc, n) =
453− iputStrLn $ show fc ++ ":WARNING: " ++ show (nsroot n) ++ " is bound as an implicit\n"
454− ++ "\tDid you mean to refer to " ++ show n ++ "?"
452+ displayImpWarning (fc, n) = do
453+ ist <- getIState
454+ let msg = show (nsroot n)
455+ ++ " is bound as an implicit\n"
456+ ++ "\tDid you mean to refer to " ++ show n ++ "?"
457+ iWarn fc (pprintErr ist (Msg msg))
455458
456459propagateParams :: IState -> [Name] -> Type -> [Name] -> PTerm -> PTerm
457460propagateParams i ps t bound tm@(PApp _ (PRef fc hls n) args)
@@ -767,5 +770,3 @@ isPlausible ist var env n ty
767770 collectConstraints env tcs t
768771 | (V i, _) <- unApply t = (Just (env !! i), tcs)
769772 | otherwise = (Nothing, tcs)
770−
771−