diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-01-25 03:08:42 +0100 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-01-25 10:34:14 +0100 |
commit | 6a5dc25f766a894dfa0e97140936dda48f6f0e62 (patch) | |
tree | bf49c56f7d4950eb333b9ae75ce62a1a613e7e66 /tool | |
parent | f38ab4e25a5e4ea9a1a5bae610239e0741c426a9 (diff) |
apply hlint suggestions
Diffstat (limited to 'tool')
-rw-r--r-- | tool/Compiler.hs | 3 | ||||
-rw-r--r-- | tool/HLint.hs | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tool/Compiler.hs b/tool/Compiler.hs index 1cdc9fd9..aa5a0e60 100644 --- a/tool/Compiler.hs +++ b/tool/Compiler.hs | |||
@@ -38,5 +38,4 @@ compile Config{..} = do | |||
38 | pplRes <- compileMain [".", sourceDir] backend baseName | 38 | pplRes <- compileMain [".", sourceDir] backend baseName |
39 | case pplRes of | 39 | case pplRes of |
40 | Left err -> putStrLn err | 40 | Left err -> putStrLn err |
41 | Right ppl -> do | 41 | Right ppl -> B.writeFile (baseName <> ".json") $ encode ppl |
42 | B.writeFile (baseName <> ".json") $ encode ppl | ||
diff --git a/tool/HLint.hs b/tool/HLint.hs new file mode 100644 index 00000000..ac847525 --- /dev/null +++ b/tool/HLint.hs | |||
@@ -0,0 +1,13 @@ | |||
1 | import "hint" HLint.HLint | ||
2 | |||
3 | ignore "Redundant do" | ||
4 | ignore "Redundant as" | ||
5 | ignore "Redundant $" = LambdaCube.Compiler.Infer | ||
6 | ignore "Use if" | ||
7 | ignore "Use ++" = Main -- UnitTests | ||
8 | ignore = LambdaCube.Compiler.Token | ||
9 | |||
10 | --ignore "Eta reduce" | ||
11 | --ignore "Move brackets to avoid $" | ||
12 | --ignore "Redundant bracket" | ||
13 | |||