summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Main.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/Main.hs b/tests/Main.hs
index 4d8e306..debd733 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -27,12 +27,8 @@ import System.Process
import System.FilePath (pathSeparator)
import System.Directory (getCurrentDirectory, getTemporaryDirectory, getDirectoryContents, findExecutable)
import Text.Parsec (ParseError)
-import qualified Paths_purescript as Paths
import qualified System.IO.UTF8 as U
-preludeFilename :: IO FilePath
-preludeFilename = Paths.getDataFileName "prelude/prelude.purs"
-
readInput :: [FilePath] -> IO (Either ParseError [P.Module])
readInput inputFiles = fmap (fmap concat . sequence) $ forM inputFiles $ \inputFile -> do
text <- U.readFile inputFile
@@ -44,7 +40,7 @@ compile opts inputFiles = do
case modules of
Left parseError ->
return (Left $ show parseError)
- Right ms -> return $ P.compile opts ms
+ Right ms -> return $ P.compile opts ms []
assert :: FilePath -> P.Options -> FilePath -> (Either String (String, String, P.Environment) -> IO (Maybe String)) -> IO ()
assert preludeExterns opts inputFile f = do
@@ -80,7 +76,7 @@ findNodeProcess = runMaybeT . msum $ map (MaybeT . findExecutable) names
main :: IO ()
main = do
- prelude <- preludeFilename
+ prelude <- P.preludeFilename
putStrLn "Compiling Prelude"
preludeResult <- compile (P.defaultOptions { P.optionsBrowserNamespace = Just "Tests" }) [prelude]
case preludeResult of