mirror of
https://github.com/rgleichman/glance.git
synced 2024-09-11 15:05:41 +03:00
Add success message to main.
This commit is contained in:
parent
0039634bc3
commit
5478df3a91
@ -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."
|
||||
|
1
todo.txt
1
todo.txt
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user