aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanne <unknown>2003-08-04 10:18:24 +0000
committerpanne <unknown>2003-08-04 10:18:24 +0000
commit3d3b5c8754225dd18a0423583ed5e37746ddf465 (patch)
tree1ed506871199300ecbf257f1e7852cb92f187c9b
parent17c3137f80b18c46755dabbdaa9588114662afee (diff)
[haddock @ 2003-08-04 10:18:24 by panne]
Don't print parentheses around one-element contexts
-rw-r--r--src/HaddockHtml.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs
index 062b29c0..f6a9bdd5 100644
--- a/src/HaddockHtml.hs
+++ b/src/HaddockHtml.hs
@@ -758,11 +758,12 @@ ppFunSig summary nm ty0 doc
-- ----------------------------------------------------------------------------
-- Types and contexts
-ppHsAsst :: (HsQName,[HsType]) -> Html
+ppHsAsst :: HsAsst -> Html
ppHsAsst (c,args) = ppHsQName c <+> hsep (map ppHsAType args)
ppHsContext :: HsContext -> Html
ppHsContext [] = empty
+ppHsContext [asst] = ppHsAsst asst
ppHsContext context = parenList (map ppHsAsst context)
ppHsForAll :: Maybe [HsName] -> HsContext -> Html