@@ -122,6 +122,7 @@ rootNsStr = "<builtins>"
122122nsName2Str :: NsName -- ^ NsName to convert
123123 -> String
124124nsName2Str n = if null n then rootNsStr else name n
125+
125126 where name [] = []
126127 name [ns] = str ns
127128 name (ns:nss) = (name nss) ++ ('.' : str ns)
@@ -189,6 +190,7 @@ referredNss (n, Just d, _) =
189190 ts = concatMap types fds
190191 names = concatMap (extractPTermNames) ts
191192 in S.map getNs $ S.fromList names
193+
192194 where getFunDocs (FunDoc f) = [f]
193195 getFunDocs (DataDoc f fs) = f:fs
194196 getFunDocs (ClassDoc _ _ fs) = fs
@@ -217,7 +219,7 @@ getAccess ist n =
217219 let res = lookupDefAcc n False (tt_ctxt ist)
218220 in case res of
219221 [(_, acc)] -> acc
220− _ -> Public -- Does this default make sense?
222+ _ -> Public
221223
222224-- | Simple predicate for whether an NsItem has Docs
223225hasDoc :: NsItem -- ^ The NsItem to test
@@ -247,8 +249,8 @@ loadDocs ist n
247249
248250
249251-- | Extracts names referred from a type.
250−-- The covering of all PTerms ensures that we avoid unanticipated cases, though
251−-- all of them are not needed. The author just did not know which!
252+-- The covering of all PTerms ensures that we avoid unanticipated cases,
253+-- though all of them are not needed. The author just did not know which!
252254-- TODO: Remove unnecessary cases
253255extractPTermNames :: PTerm -- ^ Where to extract names from
254256 -> [Name] -- ^ Extracted names
@@ -435,17 +437,18 @@ genTypeHeader nsd (FD n _ args ftype _) = do
435437 names = [ n | (n@(UN n'), _, _, _) <- args,
436438 not (T.isPrefixOf (txt "__") n') ]
437439
440+ decorator (AnnName n _ _ _) str | str /= show (nsroot n) = str
438441 decorator (AnnName n _ _ _) str | filterName n, isFun n = do
439442 R.renderHtml $ H.a ! class_ "name"
440443 ! title (toValue $ show n) ! href (toValue $ link n)
441− $ toHtml $ show $ nsroot n
444+ $ toHtml $ str
442445 decorator (AnnName n _ _ _) str | filterName n = do
443446 R.renderHtml $ H.a ! class_ "type"
444447 ! title (toValue $ show n) ! href (toValue $ link n)
445− $ toHtml $ show $ nsroot n
448+ $ toHtml $ str
446449 decorator (AnnBoundName n _) str | Just t <- M.lookup n docs = do
447450 R.renderHtml $ H.span ! class_ "arg" ! title (toValue t)
448− $ toHtml $ show n
451+ $ toHtml $ str
449452 decorator _ str = str
450453
451454 docs = M.fromList $ mapMaybe docExtractor args
@@ -511,6 +514,7 @@ createOtherDoc :: NsDict -- ^ Information about other namespaces
511514 -> Docs -- ^ Namespace item to generate HTML block for
512515 -> H.Html -- ^ Resulting HTML
513516createOtherDoc nsd (FunDoc fd) = createFunDoc nsd fd
517+
514518createOtherDoc nsd (ClassDoc n docstring fds) = do
515519 H.dt ! (A.id $ toValue $ show n) $ do
516520 "class "
@@ -518,6 +522,7 @@ createOtherDoc nsd (ClassDoc n docstring fds) = do
518522 H.dd $ do
519523 (if nullDocstring docstring then Empty else renderDoc docstring)
520524 H.dl ! class_ "decls" $ forM_ fds (createFunDoc nsd)
525+
521526createOtherDoc nsd (DataDoc fd@(FD n docstring args _ _) fds) = do
522527 H.dt ! (A.id $ toValue $ show n) $ do
523528 "data "
@@ -566,7 +571,6 @@ wrapper ns inner =
566571 H.footer $ do
567572 "Produced by IdrisDoc version "
568573 toHtml version
569−
570574
571575 where extract (Just ns) = let nestings = if null ns then 1 else length ns
572576 in (False, nsName2Str ns, nestings-1)