 r, F.Symbolic n, PP n)
              => TCEnv r -> n -> [Statement (AnnTc r)] -> TCM r (TCEnv r)
--------------------------------------------------------------------------------
initModuleEnv γ n s = do
    nms1    <- either fatal return (symEnv s)
    let nms  = nms1 `mappend` nms0
    return   $ TCE nms bnds ctx pth cha mut tThis fnId
  where
    nms0     = toFgn (envNames γ)
    bnds     = envBounds γ
    ctx      = envCtx γ
    pth      = extendAbsPath (envPath γ) n
    cha      = envCHA γ
    mut      = Nothing -- 'this' gets out of scope when entering a module
    tThis    = Nothing
    fnId     = envFnId γ



--------------------------------------------------------------------------------
-- | Environment wrappers
--------------------------------------------------------------------------------

tcEnvAdds xs γ = γ { tce_na
initModuleEnv :: (Unif r, F.Symbolic n, PP n)
              => TCEnv r -> n -> [Statement (AnnTc r)] -> TCM r (TCEnv r)
initModuleEnv γ n s = do
    nms1    <- either fatal return (symEnv s)
    let nms  = nms1 `mappend` nms0
    return   $ TCE nms bnds ctx pth cha mut tThis fnId
  where
    nms0     = toFgn (envNames γ)
    bnds     = envBounds γ
    ctx      = envCtx γ
    pth      = extendAbsPath (envPath γ) n
    cha      = envCHA γ
    mut      = Nothing -- 'this' gets out of scope when entering a module
    tThis    = Nothing
    fnId     = envFnId γ



--------------------------------------------------------------------------------
-- | Environment wrappers
--------------------------------------------------------------------------------
initModuleEnv γ n s = do
    nms1    <- either fatal return (symEnv s)
    let nms  = nms1 `mappend` nms0
    return   $ TCE nms bnds ctx pth cha mut tThis fnId
  where
    nms0     = toFgn (envNames γ)
    bnds     = envBounds γ
    ctx      = envCtx γ
    pth      = extendAbsPath (envPath γ) n
    cha      = envCHA γ
    mut      = Nothing -- 'this' gets out of scope when entering a module
    tThis    = Nothing
    fnId     = envFnId γ



--------------------------------------------------------------------------------
-- | Environment wrappers
--------------------------------------------------------------------------------