changed names of resource-1.3; added a note on homepage on release

This commit is contained in:
aarne
2008-06-25 16:54:35 +00:00
parent 7d721eb16e
commit c5c6d13546
1729 changed files with 113 additions and 32 deletions

View File

@@ -0,0 +1,22 @@
import Char (isDigit)
src = "Constructors.html"
tgt = "Cons.html"
linkfile ex = "links/" ++ ex ++ ".txt"
main = do
writeFile tgt ""
readFile src >>= (mapM_ mkLink . lines)
mkLink line = case break (=="--") (words (takeWhile (/='#')line)) of
(fun : ":" : typ, _ : num : ex) | isDigit (head num) ->
appendFile tgt ("\n" ++ takeInit line ++ " " ++ link ex typ num)
_ -> appendFile tgt ("\n" ++ line)
where
takeInit line = init (init (takeWhile (/='.') line))
link ex typ num =
"<a href=\"" ++ linkfile (example typ num) ++ "\">" ++ unwords ex ++ "</a>"
example typ num = case reverse typ of
";":val:_ -> "ex" ++ init num ++ "_" ++ val
val:_ -> "ex" ++ init num ++ "_" ++ val