on master help sign in
Change namespace display in :t and :doc
09d107aEdwin Brady
src/Idris/Docs.hs+1−1
@@ -55,7 +55,7 @@ showDoc ist d
55
55
56pprintFD :: IState -> Bool -> FunDoc -> Doc OutputAnnotation
56pprintFD :: IState -> Bool -> FunDoc -> Doc OutputAnnotation
57pprintFD ist totalityFlag (FD n doc args ty f)
57pprintFD ist totalityFlag (FD n doc args ty f)
58− = nest 4 (prettyName True (ppopt_impl ppo) [] n <+> colon <+>
58+ = nest 4 (prettyName True True [] n <+> colon <+>
59 pprintPTerm ppo [] [ n | (n@(UN n'),_,_,_) <- args
59 pprintPTerm ppo [] [ n | (n@(UN n'),_,_,_) <- args
60 , not (T.isPrefixOf (T.pack "__") n') ] infixes ty <$>
60 , not (T.isPrefixOf (T.pack "__") n') ] infixes ty <$>
61 -- show doc
61 -- show doc
src/Idris/Output.hs+3−2
@@ -87,9 +87,10 @@ iPrintFunTypes bnd n overloads = do ist <- getIState
87 let infixes = idris_infixes ist
87 let infixes = idris_infixes ist
88 let output = vsep (map (uncurry (ppOverload ppo infixes)) overloads)
88 let output = vsep (map (uncurry (ppOverload ppo infixes)) overloads)
89 iRenderResult output
89 iRenderResult output
90− where fullName n = prettyName True True bnd n
90+ where fullName ppo n | length overloads > 1 = prettyName True True bnd n
91+ | otherwise = prettyName True (ppopt_impl ppo) bnd n
91 ppOverload ppo infixes n tm =
92 ppOverload ppo infixes n tm =
92− fullName n <+> colon <+> align tm
93+ fullName ppo n <+> colon <+> align tm
93
94
94iRenderOutput :: Doc OutputAnnotation -> Idris ()
95iRenderOutput :: Doc OutputAnnotation -> Idris ()
95iRenderOutput doc =
96iRenderOutput doc =