anchor.diff:  module(Sexprs) ->
     {Name, Sexprs1} = parse_module_decl(Sexprs),
     {Exports, Sexprs2} = parse_export_decl(Sexprs1),
  -  Defuns = parse_defuns(Sexprs2),
  +  PreDefuns = parse_pre_defuns(Sexprs2),
  +  ModEnv = build_modenv(PreDefuns),
  +  Defuns = parse_defuns(PreDefuns, ModEnv),
  +  check_exports(Exports, ModEnv),
     {'ES:MODULE', Name, Exports, Defuns}.
   
   -spec toplevel(sexpr()) -> ast().
   toplevel(Sexpr) ->
     parse(Sexpr, es_env:empty(), true).
   
  -%% Internals -------------------------------------------------------------------
  +%% Internals: Modules ----------------------------------------------------------
   
   parse_module_decl(Sexprs) ->
     case Sexprs of
  
positive.code:       erlang:throw(invalid_export_decl)
    end.
  
  parse_defuns(Sexprs) ->
    lists:map(fun parse_defun/1, Sexprs).
  
  parse_defun(Sexpr) ->
    case parse(Sexpr, es_env:empty(), true) of
      {'ES:DEFINE', _Var, {'ES:LAMBDA', _Formals, _Body}} = Defun ->
        Defun;
      _ ->
        erlang:throw({invalid_defun, Sexpr})
    end.
  
  parse(Sexpr, Env) ->
    parse(Sexpr, Env, false).
  
negative.code:   end.
  
  bind(Var, ScopeEnv) when is_atom(Var) ->
    case es_env:is_bound(ScopeEnv, Var) of
      true -> erlang:throw({already_bound, Var});
      false -> es_env:enter(ScopeEnv, Var, [])
    end.
  
  parse_let(Tl, Env) ->
  