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 "declare "
              writeModule pc data m
  
      let writeDefinitions opts defs w =
          let data = Data.Build(defs)
          let pc = PrintContext.Create(w, data.NameBuilder)
          writeDefs opts pc data defs
  
      type Definitions with
  
  
negative.code: 
      let aliasInTable (tab: AliasTable) (Address qn as addr) =
          let qb = qn.Builder
          let abbrev = qb.Root(qb.Id("__ABBREV"))
          match qn with
          | Q.Nested (ns, name) ->
              let shortModuleName =
                  cached tab.ModuleAliases ns <| fun ns ->
                      let moduleName =
                          "__" + ns.Id.Text
                          |> pickName (fun n ->
                              let id = qb.Id(n)
                              tab.UsedNames.Add(id))
                      qb.Id(moduleName)
              abbrev.[shortModuleName].[name]
              |> Address
          | Q.Root name ->
              let shortName =
                  cached tab.TypeAliases qn <| fun qn ->
                      let typeName =
                          "__" + name.Text
                          |> pickName (fun n ->
                              let id = qb.Id(n)
                              tab.UsedNames.Add(id))
                      qb.Id(typeName)
              abbrev.[shortName]
              |> Address
  
      let alias pc addr =
          aliasInTable pc.AliasTable addr
  
      let writeAliasTable pc =
          writeLine pc "declare module __ABBREV {"
          indent pc {
              let tab = pc.AliasTable
              do  writeLine pc ""
                  for KeyValue (k, v) in tab.ModuleAliases do
                      write pc "export import "
                      write pc v.Text
                      write pc " = "
                      write pc k.Text
                      writeLine pc ";"
                  for KeyValue (k, v) in tab.TypeAliases do
                      write pc "interface "
                      write pc v.Text
                      write pc " extends "
                      write pc k.Text
                      writeLine pc " {}"
          }
          writeLine pc "}"
  
      let writeAddress pc addr =
          let addr = alias pc addr
  