@@ -187,11 +187,17 @@ process fn (TotCheck n) = do i <- get
187 case lookupTotal n (tt_ctxt i) of
187 case lookupTotal n (tt_ctxt i) of
188 [t] -> iputStrLn (showTotal t i)
188 [t] -> iputStrLn (showTotal t i)
189 _ -> return ()
189 _ -> return ()
190−process fn (Info n) = do i <- get
190+process fn (DebugInfo n)
191 let oi = lookupCtxtName Nothing n (idris_optimisation i)
192 let oi = lookupCtxtName Nothing n (idris_optimisation i)
192 when (not (null oi)) $ iputStrLn (show oi)
193 when (not (null oi)) $ iputStrLn (show oi)
193 let si = lookupCtxt Nothing n (idris_statics i)
194 let si = lookupCtxt Nothing n (idris_statics i)
194 when (not (null si)) $ iputStrLn (show si)
195 when (not (null si)) $ iputStrLn (show si)
196+process fn (Info n) = do i <- get
197+ case lookupCtxt Nothing n (idris_classes i) of
199+ _ -> iputStrLn "Not a class"
200+process fn (Search t) = iputStrLn "Not implemented"
195process fn (Spec t) = do (tm, ty) <- elabVal toplevel False t
201process fn (Spec t) = do (tm, ty) <- elabVal toplevel False t
196 ctxt <- getContext
202 ctxt <- getContext
197 ist <- get
203 ist <- get
@@ -238,6 +244,23 @@ process fn Metavars
238 _ -> iputStrLn $ "Global metavariables:\n\t" ++ show mvs
244 _ -> iputStrLn $ "Global metavariables:\n\t" ++ show mvs
239process fn NOP = return ()
245process fn NOP = return ()
247+classInfo :: ClassInfo -> Idris ()
248+classInfo ci = do iputStrLn "Methods:\n"
249+ mapM_ dumpMethod (class_methods ci)
251+ iputStrLn "Instances:\n"
252+ mapM_ dumpInstance (class_instances ci)
254+dumpMethod :: (Name, (FnOpts, PTerm)) -> Idris ()
255+dumpMethod (n, (_, t)) = iputStrLn $ show n ++ " : " ++ show t
257+dumpInstance :: Name -> Idris ()
258+dumpInstance n = do i <- get
261+ case lookupTy Nothing n ctxt of
262+ ts -> mapM_ (\t -> iputStrLn $ showImp imp (delab i t)) ts
241showTotal t@(Partial (Other ns)) i
264showTotal t@(Partial (Other ns)) i
242 = show t ++ "\n\t" ++ showSep "\n\t" (map (showTotalN i) ns)
265 = show t ++ "\n\t" ++ showSep "\n\t" (map (showTotalN i) ns)
243showTotal t i = show t
266showTotal t i = show t