Print extra newline if output text doesn't include a newline
This commit is contained in:
@@ -24,4 +24,7 @@ main = do
|
||||
[] -> getContents
|
||||
x : _ -> readFile x
|
||||
let res = leftmostLongestParse parseDocument fileContents
|
||||
print res
|
||||
let toPrint = show res
|
||||
case reverse toPrint of
|
||||
'\n' : _ -> putStr toPrint
|
||||
_ -> putStrLn toPrint
|
||||
|
Reference in New Issue
Block a user