blob: 23f8f4dac80fa92465823f44f3439d0b73f335c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
module DSL where
import DSL.BaseParsers (parse)
import DSL.Parsing
import DSL.Interpretation
interpretFromString :: String -> IO ()
interpretFromString = maybe err interpret . stringToProgram
where
err = putStrLn "Unable to parse program"
interpretFromFile :: FilePath -> IO ()
interpretFromFile path = readFile path >>= interpretFromString
|