blob: 1a86c346e161e73df9766c27ad46ff3e28fbaca3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
module DSL where
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
|