Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (18 sloc) 0.401 kB
module Env (
Env
, resolve, define
, initEnv
) where
import qualified Data.Map as M
import Data.Maybe
import Exp
type Env = M.Map Char Exp
resolve :: Char -> Env -> Exp
resolve c env = fromMaybe (error $ c : " is not defined") (M.lookup c env)
define :: Char -> Exp -> M.Map Char Exp -> M.Map Char Exp
define = M.insert
initEnv :: Env
initEnv = M.fromList [
('S',S)
, ('K',K)
]
Jump to Line
Something went wrong with that request. Please try again.