@@ -456,6 +456,8 @@ ideslaveProcess fn (SetConsoleWidth w) = do process stdout fn (SetConsoleWidth w
456456 iPrintResult ""
457457ideslaveProcess fn (Apropos a) = do process stdout fn (Apropos a)
458458 iPrintResult ""
459+ideslaveProcess fn (WhoCalls n) = process stdout fn (WhoCalls n)
460+ideslaveProcess fn (CallsWho n) = process stdout fn (CallsWho n)
459461ideslaveProcess fn _ = iPrintError "command not recognized or not supported"
460462
461463
@@ -1092,6 +1094,24 @@ process h fn (Apropos a) =
10921094 isUN (NS n _) = isUN n
10931095 isUN _ = False
10941096
1097+process h fn (WhoCalls n) =
1098+ do calls <- whoCalls n
1099+ ist <- getIState
1100+ ihRenderResult h . vsep $
1101+ map (\(n, ns) ->
1102+ text "Callers of" <+> prettyName True [] n <$>
1103+ indent 1 (vsep (map ((text "*" <+>) . align . prettyName True []) ns)))
1104+ calls
1105+
1106+process h fn (CallsWho n) =
1107+ do calls <- callsWho n
1108+ ist <- getIState
1109+ ihRenderResult h . vsep $
1110+ map (\(n, ns) ->
1111+ prettyName True [] n <+> text "calls:" <$>
1112+ indent 1 (vsep (map ((text "*" <+>) . align . prettyName True []) ns)))
1113+ calls
1114+
10951115classInfo :: ClassInfo -> Idris (Doc OutputAnnotation)
10961116classInfo ci = do ist <- getIState
10971117 ctxt <- getContext