Paste: Run.hs segments #1
Author: | razetime |
Mode: | haskell |
Date: | Sun, 8 Jan 2023 16:40:49 |
Plain Text |
data InterpreterConfig = InterpreterConfig
{ interpreterEntryPoint :: Name,
interpreterPrintWarnings :: Bool,
interpreterRunCode :: Maybe Name
}
main :: String -> [String] -> IO ()
main = mainWithOptions interpreterConfig options "options... <program.fut>" run
where
run _ InterpreterConfig _ _ Just prog = Just $ runMinusC prog
run [prog] config = Just $ interpret config prog
run _ _ = Nothing
New Annotation