anchor.diff:                  UsedNames = HashSet(usedNames)
               }
   
  -    type AliasContext =
  -        | ACGlobal
  -        | ACInRootModule of Q.Id * AliasTable
  -
       type PrintContext =
           {
  -            AliasContext : AliasContext
  +            AliasTable : AliasTable
               Builder : Q.Builder
               IndentedWriter : IndentedWriter
               Scope : Scope
           }
   
  -        static member Create(w, builder) =
  +        static member Create(aT, w, builder) =
               {
  -                AliasContext = ACGlobal
  +                AliasTable = aT
                   Builder = builder
                   IndentedWriter = IndentedWriter.Create(w)
                   Scope = globalScope
  
positive.code:         write pc "module "
          write pc (local addr)
          writeLine pc " {"
          match addr with
          | Q.Root name ->
              let usedNames =
                  seq {
                      yield name
                      let sc = AtModule addr
                      for ss in queryModules data sc do
                          yield ss.Id
                      for (n, d) in queryDefinitions data sc do
                          yield n.Id
                  }
              let tab = AliasTable.Create(usedNames)
              let pc = { pc with AliasContext = ACInRootModule (name, tab) }
              indent pc {
                  writeModuleBody pc data (AtModule addr)
                  writeAliasesTable pc tab
              }
          | _ ->
              indent pc { writeModuleBody pc data (AtModule addr) }
          writeLine pc "}"
  
      and writeModuleBody pc data sc =
  
negative.code:             write pc "declare "
              writeModule pc data m
  
      let getGloballyUsedNames (data: Data) =
          seq {
              let sc = Location.AtGlobalModule
              for ss in queryModules data sc do
                  yield ss.Id
              for (n, d) in queryDefinitions data sc do
                  yield n.Id
          }
  
      let writeDefinitions opts defs w =
          let data = Data.Build(defs)
          let usedNames = getGloballyUsedNames data
          let aT = AliasTable.Create(usedNames)
          let pc = PrintContext.Create(aT, w, data.NameBuilder)
          writeDefs opts pc data defs
          writeAliasTable pc
  
      type Definitions with
  
  