@@ -12,6 +12,7 @@ import Util.Pretty
1212
1313import Data.Maybe
1414import Data.List
15+import qualified Data.Text as T
1516
1617-- TODO: Only include names with public/abstract accessibility
1718
@@ -33,30 +34,32 @@ showDoc d | nullDocstring d = empty
3334
3435pprintFD :: Bool -> FunDoc -> Doc OutputAnnotation
3536pprintFD imp (FD n doc args ty f)
36− = nest 4 (prettyName imp [] n <+> colon <+> prettyImp imp ty <$> renderDocstring doc <$>
37+ = nest 4 (prettyName imp [] n <+> colon <+>
38+ pprintPTerm imp [] [ n | (n@(UN n'),_,_,_) <- args
39+ , not (T.isPrefixOf (T.pack "__") n') ] ty <$>
40+ renderDocstring doc <$>
3741 maybe empty (\f -> text (show f) <> line) f <>
3842 let argshow = showArgs args [] in
3943 if not (null argshow)
4044 then nest 4 $ text "Arguments:" <$> vsep argshow
4145 else empty)
4246
43− where showArgs ((n, ty, Exp {}, d):args) bnd
47+ where showArgs ((n, ty, Exp {}, Just d):args) bnd
4448 = bindingOf n False <+> colon <+>
45− pprintPTerm imp bnd ty <>
46− showDoc (maybe emptyDocstring id d) <> line
49+ pprintPTerm imp bnd [] ty <>
50+ showDoc d <> line
4751 :
4852 showArgs args ((n, False):bnd)
49− showArgs ((n, ty, Constraint {}, d):args) bnd
53+ showArgs ((n, ty, Constraint {}, Just d):args) bnd
5054 = text "Class constraint" <+>
51− pprintPTerm imp bnd ty <> showDoc (maybe emptyDocstring id d) <> line
55+ pprintPTerm imp bnd [] ty <> showDoc d <> line
5256 :
5357 showArgs args ((n, True):bnd)
54− showArgs ((n, ty, Imp {}, d):args) bnd
55− | Just d' <- d
58+ showArgs ((n, ty, Imp {}, Just d):args) bnd
5659 = text "(implicit)" <+>
5760 bindingOf n True <+> colon <+>
58− pprintPTerm imp bnd ty <>
59− showDoc d' <> line
61+ pprintPTerm imp bnd [] ty <>
62+ showDoc d <> line
6063 :
6164 showArgs args ((n, True):bnd)
6265 showArgs ((n, _, _, _):args) bnd = showArgs args ((n, True):bnd)