definition:
|
genHtmlCons :: DocOptions -> [(String,String)] -> String -> [CTVarIName]
-> [(String,String)] -> CConsDecl -> [BaseHtml]
genHtmlCons docopts consfldcmts tcons tvars _
(CCons (cmod,cname) _ argtypes) =
anchored (cname ++ "_CONS")
[code [opnameDoc [htxt cname],
BaseText (" :: " ++
concatMap (\t -> " "++showType docopts cmod True t++" -> ")
argtypes ++
tcons ++ concatMap (\(i,_) -> [' ',chr (97+i)]) tvars)]] :
maybe []
(\ (_,cmt) -> htxt " : " : removeTopPar (docComment2HTML docopts
(removeDash cmt)))
(getConsComment conscmts cname)
where
conscmts = getCommentType "cons" consfldcmts
genHtmlCons docopts consfldcmts tcons tvars fldCons
(CRecord (cmod,cname) _ fields) =
anchored (cname ++ "_CONS")
[code [opnameDoc [htxt cname],
BaseText (" :: " ++
concatMap (\t -> " " ++ showType docopts cmod True t ++
" -> ")
argtypes ++
tcons ++ concatMap (\(i,_) -> [' ',chr (97+i)]) tvars)]] :
(maybe []
(\ (_,cmt) -> htxt " : " : removeTopPar (docComment2HTML docopts
(removeDash cmt)))
(getConsComment conscmts cname)) ++
par [explainCat "Fields:"] :
ulistOrEmpty (map (genHtmlField docopts fldcmts cname fldCons)
(filter isExportedField fields))
where
argtypes = map (\(CField _ _ t) -> t) fields
conscmts = getCommentType "cons" consfldcmts
fldcmts = getCommentType "field" consfldcmts
|
iotype:
|
{(_,_,_,_,_,{CCons}) |-> {:} || (_,_,_,_,_,{CRecord}) |-> {:}}
|