From 25d8ffc43ae3e4ec3f361b562c664143d4e0ac21 Mon Sep 17 00:00:00 2001 From: jazullo Date: Wed, 27 Sep 2023 05:21:14 +0000 Subject: [PATCH] Temporarily call mlton rather than mpl --- gibbon-compiler/src/Gibbon/Compiler.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gibbon-compiler/src/Gibbon/Compiler.hs b/gibbon-compiler/src/Gibbon/Compiler.hs index ca2bb0af5..f2cdf0e37 100644 --- a/gibbon-compiler/src/Gibbon/Compiler.hs +++ b/gibbon-compiler/src/Gibbon/Compiler.hs @@ -564,6 +564,9 @@ clearFile fileName = removeFile fileName `catch` handleErr -- | SML Codegen +mplCompiler :: String +mplCompiler = "mlton" -- temporary until mpl is installed + goIO :: Functor m => a1 -> m a2 -> StateT b m a1 goIO prog io = StateT $ \x -> io $> (prog, x) @@ -575,7 +578,7 @@ toSML fp prog = writeFile (smlExt fp) $ render $ ppProgram prog compileMPL :: FilePath -> IO () compileMPL fp = do - cd <- system $ "mpl " <> smlExt fp + cd <- system $ mplCompiler <> " " <> smlExt fp case cd of ExitFailure n -> error $ "SML compiler failed with code " <> show n ExitSuccess -> pure ()