anchor.diff:  let populateTypeMapping (typeNode : XElement) =
       if typeNode.Element(!!"ref") <> null then
           mappedTypes <- mappedTypes.Add ((typeNode.Attribute(!!"name").Value), getCSharpType (typeNode.Element(!!"ref").Value))
  -
  -let populateTypeMappings () =
  -    doc.Document.XPathSelectElements("//types/type") |> Seq.iter populateTypeMapping
   
   let extractDoc (indent : int) (fieldNode : XElement) =
       let indentString = new String('\t', indent)
  
positive.code: let rec extractCSharpDictionary (fieldNode : XElement) =
      sprintf "Dictionary<%s, %s>"
          (fieldNode.Element(!!"map").Descendants(!!"key") |> Seq.exactlyOne |> extractCSharpType)
          (fieldNode.Element(!!"map").Descendants(!!"value") |> Seq.head |> extractCSharpType) // TODO: Eliminate this Seq.head; support unions properly! :(
  
  and extractCSharpType (fieldNode : XElement) =
      let cSharpType = fieldNode.XPathSelectElement(".//ref").Value |> getCSharpType
      match fieldNode.Element(!!"list"), fieldNode.Element(!!"map") with
          | null, null -> sprintf "%s" cSharpType
          | _ , null -> sprintf "%s[]" cSharpType
          | null, _ -> fieldNode |> extractCSharpDictionary
          | _, _ -> failwithf "Confused by both map and list %s" (fieldNode.Attribute(!!"name").Value)
  
  let getField (fieldNode : XElement) =
      sprintf "%s\t\tpublic %s %s;\r\n"
  
negative.code: let getAllJsonTypes () =
      sprintf """// Code generated by UpdateJson.fsx. Do not hand-edit!
  
  using System.Collections.Generic;
  
  namespace DanTup.DartAnalysis.Json
  {
  %s
  %s
  %s
  %s
  }"""
          (doc.Document.XPathSelectElements("//union") |> collect getUnionInterfaces)
          (doc.Document.XPathSelectElements("//types/type") |> collect getType)
          (doc.Document.XPathSelectElements("//domain/request") |> collect getRequest)
          (doc.Document.XPathSelectElements("//domain/request") |> collect getResponse)
  