@@ -46,7 +46,6 @@ import Text.Blaze.Html.Renderer.Utf8 (renderHtml)
46import Text.Blaze.Html5 (preEscapedToHtml, toHtml, (!))
46import Text.Blaze.Html5 (preEscapedToHtml, toHtml, (!))
47import qualified Text.Blaze.Html5 as H
47import qualified Text.Blaze.Html5 as H
48import Text.Blaze.Html5.Attributes as A
48import Text.Blaze.Html5.Attributes as A
49−import Text.Blaze.Internal (MarkupM(Empty))
50import Text.Blaze.Renderer.String (renderMarkup)
49import Text.Blaze.Renderer.String (renderMarkup)
51import Text.PrettyPrint.Annotated.Leijen (displayDecorated, renderCompact)
50import Text.PrettyPrint.Annotated.Leijen (displayDecorated, renderCompact)
@@ -543,7 +542,7 @@ createFunDoc :: IState -- ^ Needed to determine the types of names
543createFunDoc ist fd@(FD name docstring args ftype fixity) = do
542createFunDoc ist fd@(FD name docstring args ftype fixity) = do
544 H.dt ! (A.id $ toValue $ show name) $ genTypeHeader ist fd
543 H.dt ! (A.id $ toValue $ show name) $ genTypeHeader ist fd
545 H.dd $ do
544 H.dd $ do
546− (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring)
545+ (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
547 let args' = filter (\(_, _, _, d) -> isJust d) args
546 let args' = filter (\(_, _, _, d) -> isJust d) args
548 if (not $ null args') || (isJust fixity)
547 if (not $ null args') || (isJust fixity)
549 then H.dl $ do
548 then H.dl $ do
@@ -551,9 +550,9 @@ createFunDoc ist fd@(FD name docstring args ftype fixity) = do
551 H.dt ! class_ "fixity" $ "Fixity"
550 H.dt ! class_ "fixity" $ "Fixity"
552 let f = fromJust fixity
551 let f = fromJust fixity
553 H.dd ! class_ "fixity" ! title (toValue $ show f) $ genFix f
552 H.dd ! class_ "fixity" ! title (toValue $ show f) $ genFix f
554− else Empty
553+ else mempty
555 forM_ args' genArg
554 forM_ args' genArg
556− else Empty
555+ else mempty
558 where genFix (Infixl {prec=p}) =
557 where genFix (Infixl {prec=p}) =
559 toHtml $ "Left associative, precedence " ++ show p
558 toHtml $ "Left associative, precedence " ++ show p
@@ -563,7 +562,7 @@ createFunDoc ist fd@(FD name docstring args ftype fixity) = do
563 toHtml $ "Non-associative, precedence " ++ show p
562 toHtml $ "Non-associative, precedence " ++ show p
564 genFix (PrefixN {prec=p}) =
563 genFix (PrefixN {prec=p}) =
565 toHtml $ "Prefix, precedence " ++ show p
564 toHtml $ "Prefix, precedence " ++ show p
566− genArg (_, _, _, Nothing) = Empty
565+ genArg (_, _, _, Nothing) = mempty
567 genArg (name, _, _, Just docstring) = do
566 genArg (name, _, _, Just docstring) = do
568 H.dt $ toHtml $ show name
567 H.dt $ toHtml $ show name
569 H.dd $ Docstrings.renderHtml docstring
568 H.dd $ Docstrings.renderHtml docstring
@@ -584,7 +583,7 @@ createOtherDoc ist (InterfaceDoc n docstring fds _ _ _ _ _ c) = do
584 $ toHtml $ name $ nsroot n
583 $ toHtml $ name $ nsroot n
585 H.span ! class_ "signature" $ nbsp
584 H.span ! class_ "signature" $ nbsp
586 H.dd $ do
585 H.dd $ do
587− (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring)
586+ (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
588 H.dl ! class_ "decls" $ (forM_ (maybeToList c ++ fds) (createFunDoc ist))
587 H.dl ! class_ "decls" $ (forM_ (maybeToList c ++ fds) (createFunDoc ist))
590 where name (NS n ns) = show (NS (sUN $ name n) ns)
589 where name (NS n ns) = show (NS (sUN $ name n) ns)
@@ -601,10 +600,10 @@ createOtherDoc ist (RecordDoc n doc ctor projs params) = do
601 $ toHtml $ name $ nsroot n
600 $ toHtml $ name $ nsroot n
602 H.span ! class_ "type" $ do nbsp ; prettyParameters
601 H.span ! class_ "type" $ do nbsp ; prettyParameters
603 H.dd $ do
602 H.dd $ do
604− (if nullDocstring doc then Empty else Docstrings.renderHtml doc)
603+ (if nullDocstring doc then mempty else Docstrings.renderHtml doc)
605 if not $ null params
604 if not $ null params
606 then H.dl $ forM_ params genParam
605 then H.dl $ forM_ params genParam
607− else Empty
606+ else mempty
608 H.dl ! class_ "decls" $ createFunDoc ist ctor
607 H.dl ! class_ "decls" $ createFunDoc ist ctor
609 H.dl ! class_ "decls" $ forM_ projs (createFunDoc ist)
608 H.dl ! class_ "decls" $ forM_ projs (createFunDoc ist)
610 where name (NS n ns) = show (NS (sUN $ name n) ns)
609 where name (NS n ns) = show (NS (sUN $ name n) ns)
@@ -624,14 +623,14 @@ createOtherDoc ist (DataDoc fd@(FD n docstring args _ _) fds) = do
624 H.span ! class_ "word" $ do "data"; nbsp
623 H.span ! class_ "word" $ do "data"; nbsp
625 genTypeHeader ist fd
624 genTypeHeader ist fd
626 H.dd $ do
625 H.dd $ do
627− (if nullDocstring docstring then Empty else Docstrings.renderHtml docstring)
626+ (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
628 let args' = filter (\(_, _, _, d) -> isJust d) args
627 let args' = filter (\(_, _, _, d) -> isJust d) args
629 if not $ null args'
628 if not $ null args'
630 then H.dl $ forM_ args' genArg
629 then H.dl $ forM_ args' genArg
631− else Empty
630+ else mempty
632 H.dl ! class_ "decls" $ forM_ fds (createFunDoc ist)
631 H.dl ! class_ "decls" $ forM_ fds (createFunDoc ist)
634− where genArg (_, _, _, Nothing) = Empty
633+ where genArg (_, _, _, Nothing) = mempty
635 genArg (name, _, _, Just docstring) = do
634 genArg (name, _, _, Just docstring) = do
636 H.dt $ toHtml $ show name
635 H.dt $ toHtml $ show name
637 H.dd $ Docstrings.renderHtml docstring
636 H.dd $ Docstrings.renderHtml docstring
@@ -663,7 +662,7 @@ wrapper ns inner =
663 H.div ! class_ "wrapper" $ do
662 H.div ! class_ "wrapper" $ do
664 H.header $ do
663 H.header $ do
665 H.strong "IdrisDoc"
664 H.strong "IdrisDoc"
666− if index then Empty else do
665+ if index then mempty else do
668 toHtml str
667 toHtml str
669 H.nav $ H.a ! href (toValue indexPage) $ "Index"
668 H.nav $ H.a ! href (toValue indexPage) $ "Index"