createOtherDoc ist (InterfaceDoc n docstring fds _ _ _ _ _ c) = do
  H.dt ! (A.id $ toValue $ show n) $ do
    H.span ! class_ "word" $ do "interface"; nbsp
    H.span ! class_ "name type"
           ! title  (toValue $ show n)
           $ toHtml $ name $ nsroot n
    H.span ! class_ "signature" $ nbsp
  H.dd $ do
    (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
    H.dl ! class_ "decls" $ (forM_ (maybeToList c ++ fds) (createFunDoc ist))

  where name (NS n ns) = show (NS (sUN $ name n) ns)
        name n         = let n' = show n
                         in  if (head n') `elem` opChars
                                then '(':(n' ++ ")")
                                else n'
createOtherDoc ist (InterfaceDoc n docstring fds _ _ _ _ _ c) = do
  H.dt ! (A.id $ toValue $ show n) $ do
    H.span ! class_ "word" $ do "interface"; nbsp
    H.span ! class_ "name type"
           ! title  (toValue $ show n)
           $ toHtml $ name $ nsroot n
    H.span ! class_ "signature" $ nbsp
  H.dd $ do
    (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
    H.dl ! class_ "decls" $ (forM_ (maybeToList c ++ fds) (createFunDoc ist))

  where name (NS n ns) = show (NS (sUN $ name n) ns)
        name n         = let n' = show n
                         in  if (head n') `elem` opChars
                                then '(':(n' ++ ")")
                                else n'
createOtherDoc ist (InterfaceDoc n docstring fds _ _ _ _ _ c) = do
  H.dt ! (A.id $ toValue $ show n) $ do
    H.span ! class_ "word" $ do "interface"; nbsp
    H.span ! class_ "name type"
           ! title  (toValue $ show n)
           $ toHtml $ name $ nsroot n
    H.span ! class_ "signature" $ nbsp
  H.dd $ do
    (if nullDocstring docstring then mempty else Docstrings.renderHtml docstring)
    H.dl ! class_ "decls" $ (forM_ (maybeToList c ++ fds) (createFunDoc ist))

  where name (NS n ns) = show (NS (sUN $ name n) ns)
        name n         = let n' = show n
                         in  if (head n') `elem` opChars
                                then '(':(n' ++ ")")
                                else n'