aboutsummaryrefslogtreecommitdiff
path: root/src/Environment.hs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-10-23 13:33:31 +0100
committerAkshay <[email protected]>2020-10-23 13:33:31 +0100
commit494078074e5f620f11f72e48d0fc44cff73faaf2 (patch)
tree25aea03ceaae5fc3010e1894ae74d6eee0259cb5 /src/Environment.hs
parentf68c7f7a140127320f9dadc57a3d2a485b86d3df (diff)
refactor internal datatypes to Base
- avoids cyclic module dependencies - cleaner exports to Main module
Diffstat (limited to 'src/Environment.hs')
-rw-r--r--src/Environment.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Environment.hs b/src/Environment.hs
index 4c444b6..b7b7ee6 100644
--- a/src/Environment.hs
+++ b/src/Environment.hs
@@ -8,15 +8,13 @@ module Environment ( Env
8 , IOResult 8 , IOResult
9 ) where 9 ) where
10 10
11import Base (Env (..), Expr (..))
11import Control.Applicative ((<$>)) 12import Control.Applicative ((<$>))
12import Control.Monad (mapM) 13import Control.Monad (mapM)
13import Control.Monad.Except 14import Control.Monad.Except
14import Data.IORef 15import Data.IORef
15import Data.Maybe (isJust) 16import Data.Maybe (isJust)
16import Error.Base (LispError (..), LispResult (..), unwrap) 17import Error.Base (LispError (..), LispResult (..), unwrap)
17import Parser (Expr (..))
18
19type Env = IORef [(String, IORef Expr)]
20 18
21newEnv :: IO Env 19newEnv :: IO Env
22newEnv = newIORef [] 20newEnv = newIORef []