@@ -187,11 +187,17 @@ process fn (TotCheck n) = do i <- get
187187 case lookupTotal n (tt_ctxt i) of
188188 [t] -> iputStrLn (showTotal t i)
189189 _ -> return ()
190−process fn (Info n) = do i <- get
190+process fn (DebugInfo n)
191+ = do i <- get
191192 let oi = lookupCtxtName Nothing n (idris_optimisation i)
192193 when (not (null oi)) $ iputStrLn (show oi)
193194 let si = lookupCtxt Nothing n (idris_statics i)
194195 when (not (null si)) $ iputStrLn (show si)
196+process fn (Info n) = do i <- get
197+ case lookupCtxt Nothing n (idris_classes i) of
198+ [c] -> classInfo c
199+ _ -> iputStrLn "Not a class"
200+process fn (Search t) = iputStrLn "Not implemented"
195201process fn (Spec t) = do (tm, ty) <- elabVal toplevel False t
196202 ctxt <- getContext
197203 ist <- get
@@ -238,6 +244,23 @@ process fn Metavars
238244 _ -> iputStrLn $ "Global metavariables:\n\t" ++ show mvs
239245process fn NOP = return ()
240246
247+classInfo :: ClassInfo -> Idris ()
248+classInfo ci = do iputStrLn "Methods:\n"
249+ mapM_ dumpMethod (class_methods ci)
250+ iputStrLn ""
251+ iputStrLn "Instances:\n"
252+ mapM_ dumpInstance (class_instances ci)
253+
254+dumpMethod :: (Name, (FnOpts, PTerm)) -> Idris ()
255+dumpMethod (n, (_, t)) = iputStrLn $ show n ++ " : " ++ show t
256+
257+dumpInstance :: Name -> Idris ()
258+dumpInstance n = do i <- get
259+ ctxt <- getContext
260+ imp <- impShow
261+ case lookupTy Nothing n ctxt of
262+ ts -> mapM_ (\t -> iputStrLn $ showImp imp (delab i t)) ts
263+
241264showTotal t@(Partial (Other ns)) i
242265 = show t ++ "\n\t" ++ showSep "\n\t" (map (showTotalN i) ns)
243266showTotal t i = show t