Module Tools.MakeDocIndex

Inspect a frege documentation directory and make files that enable framed HTML view.

Imports

Table of Content

Definitions

separatorRERegex

regular expression to split path names on File.separator

htmlAtEndRegex

regular expression to detect "*.html" files

unHtmlStringString

drop ".html" from the end of a name

isMetaStringBool

tell if this is the name of a meta file

findHtmlStringIO [(String, String)]

walk a directory and get all HTML files

main[String]IO Bool

We will make the following files:

fregedoc.html defines 3 frames: left upper, left lower and right.

prefix-frame.html contains a list of the module prefixes, which are shown in the left upper frame. Each entry causes the left lower frame to display the modules with that prefix.

For each module prefix a file that lists the actual modules. This one is displayed in the left lower frame, and clicking on one of the names causes the module documentation to appear in the right frame. For example, frame-frege.prelude.html would contain PreludeBase, PreludeMonad and so on.

There will be a pseudo module prefix "All Modules" and a corresponding frame-All-Modules.html that contains links to all the modules.

printFregeDocStringIO ()

Print the top file with the frameset

fileInStringStringIO String

compute the path of a file in a certain directory

makePrefixFrameString → [String] → IO ()

make the prefix-frame.html file

makeFrameStringString → [(String, String)] → IO ()
wrapStringStringString

wrap in html tags, i.e. <xx>foo</xx>

linkElemStringStringString

make link from a relative path and a HTML file name

frameElemStringString

make link to frame

prefixNameStringString

display name of a module prefix

prefixFrameStringString

file name of a module prefix

Functions and Values by Type

StringString → [(String, String)] → IO ()

makeFrame

StringStringIO String

fileIn

StringStringString

linkElem, wrap

String → [String] → IO ()

makePrefixFrame

StringIO [(String, String)]

findHtml

StringIO ()

printFregeDoc

StringString

frameElem, prefixFrame, prefixName, unHtml

StringBool

isMeta

[String] → IO Bool

main

Regex

htmlAtEnd, separatorRE

Valid HTML 4.01 Strict