summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilFreeman <>2014-11-09 22:45:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-11-09 22:45:00 (GMT)
commit254c97a5f26fdaf5d48b5b79024f1056703f32b7 (patch)
treedd2fda7ce5c18022d6aa676577197a2ba4cf0d47 /tests
parent88fe21af7aabeb80065badddd09be9ce397542d0 (diff)
version 0.6.0.20.6.0.2
Diffstat (limited to 'tests')
-rw-r--r--tests/Main.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Main.hs b/tests/Main.hs
index 8bbdcd5..0fa63d5 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -30,20 +30,20 @@ import System.Directory (getCurrentDirectory, getTemporaryDirectory, getDirector
import Text.Parsec (ParseError)
import qualified System.IO.UTF8 as U
-readInput :: [FilePath] -> IO [(Maybe FilePath, String)]
+readInput :: [FilePath] -> IO [(FilePath, String)]
readInput inputFiles = forM inputFiles $ \inputFile -> do
text <- U.readFile inputFile
- return (Just inputFile, text)
+ return (inputFile, text)
loadPrelude :: Either String (String, String, P.Environment)
loadPrelude =
- case P.parseModulesFromFiles [(Nothing, P.prelude)] of
+ case P.parseModulesFromFiles id [("", P.prelude)] of
Left parseError -> Left (show parseError)
Right ms -> P.compile (P.defaultCompileOptions { P.optionsAdditional = P.CompileOptions "Tests" [] [] }) (map snd ms) []
compile :: P.Options P.Compile -> [FilePath] -> IO (Either String (String, String, P.Environment))
compile opts inputFiles = do
- modules <- P.parseModulesFromFiles <$> readInput inputFiles
+ modules <- P.parseModulesFromFiles id <$> readInput inputFiles
case modules of
Left parseError ->
return (Left $ show parseError)