Add success message to main.

This commit is contained in:
Robbie Gleichman 2016-12-10 11:38:15 -08:00
parent 0039634bc3
commit 5478df3a91
2 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import Translate(drawingsFromModule)
renderFile :: String -> String -> IO (Diagram B)
renderFile inputFilename includeComments = do
putStrLn $ "Translating file " ++ inputFilename ++ " into a Glance image."
parseResult <- Exts.parseFileWithComments
(Exts.defaultParseMode
{Exts.extensions = [Exts.EnableExtension Exts.MultiParamTypeClasses, Exts.EnableExtension Exts.FlexibleContexts],
@ -36,8 +37,11 @@ renderFile inputFilename includeComments = do
justDiagrams = vsep 1 $ fmap alignL diagrams
diagramsAndMaybeComments = if includeComments == "c" then diagramsAndComments else justDiagrams
--print comments
pure (bgFrame 1 (backgroundC colorScheme) diagramsAndMaybeComments :: Diagram B)
main :: IO ()
main = mainWith renderFile
main = do
mainWith renderFile
putStrLn "Successfully translated file."

View File

@ -11,6 +11,7 @@ Fix the arrowheads being too big for SyntaxGraph drawings.
-- Visual todos:
Draw bounding boxes for lambdas (use dashed lines)
Case icon that can embed literals
-- Make an icon font/library with labeled ports. E.g. the apply icon would have text labels "function", "result", "arg 0", "arg 1", etc.
-- Don't rotate text and nested icons, give them rectangular bounding boxes in GraphViz. (Perhaps use a typeclass for isRotateAble)
-- Give lines a black border to make line crossings easier to see.