Skip to content

Commit

Permalink
move documentation to markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
colah committed Jul 17, 2012
1 parent 17cbd69 commit ab6f143
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 13 additions & 10 deletions docgen.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@ main = do
examples = filter isExample moduleDocList
arguments = filter isArgument moduleDocList
putStrLn moduleName
if not $ null examples then putStrLn " examples:" else return ()
forM_ examples $ \(ExampleDoc example) ->
putStrLn $ " " ++ example
putStrLn " arguments:"
putStrLn (map (const '-') moduleName)
putStrLn ""
if not $ null examples then putStrLn "**Examples:**\n" else return ()
forM_ examples $ \(ExampleDoc example) -> do
putStrLn $ " * `" ++ example ++ "`"
putStrLn ""
putStrLn "**Arguments:**\n"
forM_ arguments $ \(ArgumentDoc name posfallback description) ->
case (posfallback, description) of
(Nothing, "") -> do
putStrLn $ " " ++ name
putStrLn $ " * `" ++ name ++ "`"
(Just fallback, "") -> do
putStrLn $ " " ++ name ++ " = " ++ fallback
putStrLn $ " * `" ++ name ++ " = " ++ fallback ++ "`"
(Nothing, _) -> do
putStrLn $ " " ++ name
putStrLn $ " " ++ description
putStrLn $ " * `" ++ name ++ "`"
putStrLn $ " " ++ description
(Just fallback, _) -> do
putStrLn $ " " ++ name ++ " = " ++ fallback
putStrLn $ " " ++ description
putStrLn $ " * `" ++ name ++ " = " ++ fallback ++ "`"
putStrLn $ " " ++ description
putStrLn ""

2 changes: 1 addition & 1 deletion implicit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Library
Graphics.Implicit.MathUtil
Graphics.Implicit.SaneOperators
Graphics.Implicit.ExtOpenScad
Graphics.Implicit.ObjectUtil
Other-Modules:
Graphics.Implicit.Primitives
Graphics.Implicit.ObjectUtil
Graphics.Implicit.ObjectUtil.GetBox2
Graphics.Implicit.ObjectUtil.GetBox3
Graphics.Implicit.ObjectUtil.GetImplicit2
Expand Down

0 comments on commit ab6f143

Please sign in to comment.