diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-11 20:57:07 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-12 00:50:34 +0200 |
commit | e4725c07ee3e7e3fc010df418d16f37c39b0af0f (patch) | |
tree | cb10e1d1203eed875955097311ccbe0943564226 /test | |
parent | 95e006bf5afa8d3473e3fe4401f4c9316186a428 (diff) |
mutual function definitions
Diffstat (limited to 'test')
-rw-r--r-- | test/runTests.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/runTests.hs b/test/runTests.hs index 9293381e..10f5bcb0 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -32,6 +32,7 @@ import qualified Data.Text.IO as TIO | |||
32 | import Text.Printf | 32 | import Text.Printf |
33 | 33 | ||
34 | import LambdaCube.Compiler | 34 | import LambdaCube.Compiler |
35 | import LambdaCube.Compiler.DeBruijn | ||
35 | import LambdaCube.Compiler.Pretty hiding ((</>)) | 36 | import LambdaCube.Compiler.Pretty hiding ((</>)) |
36 | 37 | ||
37 | ------------------------------------------ utils | 38 | ------------------------------------------ utils |
@@ -126,7 +127,7 @@ isReject = (".reject" `elem`) . takeExtensions' | |||
126 | 127 | ||
127 | -- for the repl | 128 | -- for the repl |
128 | parse srcName = do | 129 | parse srcName = do |
129 | pplRes <- parseModule ["testdata"] srcName | 130 | pplRes <- parseModule ["testdata"] (srcName ++ ".lc") |
130 | case pplRes of | 131 | case pplRes of |
131 | Left err -> fail $ show err | 132 | Left err -> fail $ show err |
132 | Right ppl -> putStrLn ppl | 133 | Right ppl -> putStrLn ppl |
@@ -244,7 +245,7 @@ doTest Config{..} (i, fn) = do | |||
244 | showGE fname ge = "------------ desugared source code": intersperse "" (map pShow desug) | 245 | showGE fname ge = "------------ desugared source code": intersperse "" (map pShow desug) |
245 | ++ "------------ core code": intersperse "" | 246 | ++ "------------ core code": intersperse "" |
246 | [ DAnn (text n) (DResetFreshNames $ pShow t) | 247 | [ DAnn (text n) (DResetFreshNames $ pShow t) |
247 | <$$> DLet "=" (text n) (DResetFreshNames $ mkDoc (True, True) e) | 248 | <$$> DLet "=" (text n) (DResetFreshNames $ mkDoc (False, True) e) |
248 | | (n, (e, t, RangeSI (Range fi _ _))) <- Map.toList ge, fileId fi == fileId fname] | 249 | | (n, (e, t, RangeSI (Range fi _ _))) <- Map.toList ge, fileId fi == fileId fname] |
249 | ++ listAllInfos' i | 250 | ++ listAllInfos' i |
250 | 251 | ||