on master help sign in
Remove deprecatd classInfo method from REPL.hs
commit4168f0579a3a709ccea3189893c2cd2535ff68b2 authorPaul Koerbitz <paul.koerbitz@theppro.com> dateThu 1 May 2014, 01:06 (12 years ago) parent6a99256
1 file changed−25
src/Idris/REPL.hs−25
src/Idris/REPL.hs−25
@@ -1096,31 +1096,6 @@ process h fn (MakeDoc s) =
10961096 Left err -> iPrintError err
10971097
10981098
1099−classInfo :: ClassInfo -> Idris (Doc OutputAnnotation)
1100−classInfo ci = do ist <- getIState
1101− ctxt <- getContext
1102− return $
1103− text "Parameters:" <+>
1104− hsep (punctuate comma (map (prettyName False params') params)) <>
1105− line <> line <>
1106− text "Methods:" <> line <>
1107− indent 2 (vsep (map (dumpMethod ist) (class_methods ci))) <> line <> line <>
1108− text "Default superclass instances:" <>
1109− line <>
1110− indent 2 (vsep (map (dumpDefaultInstance ist) (class_default_superclasses ci))) <>
1111− line <>
1112− text "Instances:" <> line <>
1113− indent 2 (vsep (map (dumpInstance ist ctxt) (class_instances ci)))
1114− where dumpMethod :: IState -> (Name, (FnOpts, PTerm)) -> Doc OutputAnnotation
1115− dumpMethod ist (n, (_, t)) = prettyName False [] n <+> colon <+> pp ist t
1116− dumpDefaultInstance :: IState -> PDecl -> Doc OutputAnnotation
1117− dumpDefaultInstance ist (PInstance _ _ _ _ _ t _ _) = pp ist t
1118− dumpInstance :: IState -> Context -> Name -> Doc OutputAnnotation
1119− dumpInstance ist ctxt n = pp ist $ delabTy ist n
1120− params = class_params ci
1121− params' = zip params (repeat False)
1122− pp ist = pprintPTerm (opt_showimp (idris_options ist)) params' []
1123−
11241099showTotal :: Totality -> IState -> String
11251100showTotal t@(Partial (Other ns)) i
11261101 = show t ++ "\n\t" ++ showSep "\n\t" (map (showTotalN i) ns)