-- | Create a new store for Code data
addCodeStoreToEnvironment :: (HasEnvironment m) => m ()
addCodeStoreToEnvironment = do e <- getEnvironment
                               mv <- liftIO $ newMVar $ empty
                               setEnvironment $ e {getCodeStore = Just $ CodeStore mv}

-- | This function attempts to pull a function from a pre-loaded cache or, if
-- the function doesn't exist or is out-of-date, loads the code from disk.
addCodeStoreToEnvironment :: (HasEnvironment m) => m ()
addCodeStoreToEnvironment = do e <- getEnvironment
                               mv <- liftIO $ newMVar $ empty
                               setEnvironment $ e {getCodeStore = Just $ CodeStore mv}

-- | This function attempts to pull a function from a pre-loaded cache or, if
-- the function doesn't exist or is out-of-date, loads the code from disk.
addCodeStoreToEnvironment = do e <- getEnvironment
                               mv <- liftIO $ newMVar $ empty
                               setEnvironment $ e {getCodeStore = Just $ CodeStore mv}

-- | This function attempts to pull a function from a pre-loaded cache or, if
-- the function doesn't exist or is out-of-date, loads the code from disk.