Add function to pretty print; commented out my word wrap and use a

built-in one instead
This commit is contained in:
2025-06-10 14:01:52 -04:00
parent e025614324
commit 4e9f84c2bb
3 changed files with 27 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ main = do
[] -> getContents
x : _ -> readFile x
let res = leftmostLongestParse parseDocument fileContents
let toPrint = show res
let toPrint = prettyPrint res
case reverse toPrint of
'\n' : _ -> putStr toPrint
_ -> putStrLn toPrint