on master help sign in
Add some indentation to functions in :doc

This vastly improves the readability of :doc for typeclasses

commit68d9e6e69f0bdfe1c4f939f891cd8bb8e906719b authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateFri 14 Feb 2014, 20:50 (13 years ago) parentb3be13b
1 file changed+6−6
src/Idris/Docs.hs+6−6
src/Idris/Docs.hs+6−6
@@ -29,12 +29,12 @@ showDoc x = text " -- " <> text x
2929
3030pprintFD :: Bool -> FunDoc -> Doc OutputAnnotation
3131pprintFD imp (FD n doc args ty f)
32− = prettyName imp [] n <+> colon <+> prettyImp imp ty <$> showDoc doc <$>
33− maybe empty (\f -> text (show f) <> line) f <>
34− let argshow = mapMaybe showArg args in
35− if not (null argshow)
36− then nest 4 $ text "Arguments:" <$> vsep argshow
37− else empty
32+ = nest 4 (prettyName imp [] n <+> colon <+> prettyImp imp ty <$> showDoc doc <$>
33+ maybe empty (\f -> text (show f) <> line) f <>
34+ let argshow = mapMaybe showArg args in
35+ if not (null argshow)
36+ then nest 4 $ text "Arguments:" <$> vsep argshow
37+ else empty)
3838
3939 where showArg (n, ty, arg@(Exp {}))
4040 = Just $ bindingOf n False <+> colon <+> prettyImp imp ty <>