diff options
author | Akshay <[email protected]> | 2020-10-23 13:33:31 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-23 13:33:31 +0100 |
commit | 494078074e5f620f11f72e48d0fc44cff73faaf2 (patch) | |
tree | 25aea03ceaae5fc3010e1894ae74d6eee0259cb5 /src/Environment.hs | |
parent | f68c7f7a140127320f9dadc57a3d2a485b86d3df (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.hs | 4 |
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 | ||
11 | import Base (Env (..), Expr (..)) | ||
11 | import Control.Applicative ((<$>)) | 12 | import Control.Applicative ((<$>)) |
12 | import Control.Monad (mapM) | 13 | import Control.Monad (mapM) |
13 | import Control.Monad.Except | 14 | import Control.Monad.Except |
14 | import Data.IORef | 15 | import Data.IORef |
15 | import Data.Maybe (isJust) | 16 | import Data.Maybe (isJust) |
16 | import Error.Base (LispError (..), LispResult (..), unwrap) | 17 | import Error.Base (LispError (..), LispResult (..), unwrap) |
17 | import Parser (Expr (..)) | ||
18 | |||
19 | type Env = IORef [(String, IORef Expr)] | ||
20 | 18 | ||
21 | newEnv :: IO Env | 19 | newEnv :: IO Env |
22 | newEnv = newIORef [] | 20 | newEnv = newIORef [] |