diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-04-29 12:52:37 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-04-29 12:52:37 +0200 |
commit | e57768c37bc8cbc85b58bf47a71562d0d782c698 (patch) | |
tree | 471ede50cbdc347faab61667e19c2e3350f4c200 /tool | |
parent | 58a479b781935155e09f565d2488693850bf21c6 (diff) |
use Doc instead of String is several places
Diffstat (limited to 'tool')
-rw-r--r-- | tool/Compiler.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/Compiler.hs b/tool/Compiler.hs index 359b23d6..e3fdd7a3 100644 --- a/tool/Compiler.hs +++ b/tool/Compiler.hs | |||
@@ -46,7 +46,7 @@ prettyPrint srcName output = do | |||
46 | parse srcName backend includePaths output = do | 46 | parse srcName backend includePaths output = do |
47 | pplRes <- parseModule includePaths srcName | 47 | pplRes <- parseModule includePaths srcName |
48 | case pplRes of | 48 | case pplRes of |
49 | Left err -> fail err | 49 | Left err -> fail $ show err |
50 | Right ppl -> maybe (putStrLn ppl) (`writeFile` ppl) output | 50 | Right ppl -> maybe (putStrLn ppl) (`writeFile` ppl) output |
51 | 51 | ||
52 | compile srcName backend includePaths output = do | 52 | compile srcName backend includePaths output = do |
@@ -57,7 +57,7 @@ compile srcName backend includePaths output = do | |||
57 | do | 57 | do |
58 | pplRes <- compileMain includePaths backend srcName | 58 | pplRes <- compileMain includePaths backend srcName |
59 | case pplRes of | 59 | case pplRes of |
60 | Left err -> fail err | 60 | Left err -> fail $ show err |
61 | Right ppl -> B.writeFile (withOutName $ baseName <> ".json") $ encode ppl | 61 | Right ppl -> B.writeFile (withOutName $ baseName <> ".json") $ encode ppl |
62 | -- True -> writeFile (withOutName $ baseName <> ".ppl") $ prettyShowUnlines ppl | 62 | -- True -> writeFile (withOutName $ baseName <> ".ppl") $ prettyShowUnlines ppl |
63 | 63 | ||