anchor.diff:  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! :(
  -
  +        (fieldNode.Element(!!"map").Descendants(!!"value") |> Seq.exactlyOne |> extractCSharpType) // TODO: Eliminate this Seq.head; support unions properly! :(
  +and extractCSharpUnion (unionNode : XElement) =
  +    "I" + (unionNode.Elements(!!"ref") |> Seq.map (fun n -> n.Value |> getCSharpType) |> String.concat "Or")
   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)
  +    match fieldNode.Element(!!"list"), fieldNode.Element(!!"map"), fieldNode.Element(!!"union") with
  +        | null, null, null -> sprintf "%s" cSharpType
  +        | _ , null, null -> sprintf "%s[]" cSharpType
  +        | null, _, null -> fieldNode |> extractCSharpDictionary
  +        | null, null, unionNode -> unionNode |> extractCSharpUnion
  +        | _, _, _ -> failwithf "Confused by both map and list %s" (fieldNode.Attribute(!!"name").Value)
  +
  +let populateUnionMapping (unionNode : XElement) =
  +    let unionInterface = unionNode |> extractCSharpUnion
  +    unionNode.Descendants(!!"ref") |> Seq.iter (fun i -> unionTypes <- unionTypes.Add(i.Value, unionInterface))
   
   let getField (fieldNode : XElement) =
       sprintf "%s\t\tpublic %s %s;\r\n"
  
positive.code:     Map.empty
          .Add("String", "string")
  
  let collect (f : XElement -> string) (x : seq<XElement>) : string =
      x |> Seq.map f |> String.concat ""
  
  
negative.code: let populateTypeMapping (typeNode : XElement) =
      if typeNode.Element(!!"ref") <> null then
          mappedTypes <- mappedTypes.Add ((typeNode.Attribute(!!"name").Value), getCSharpType (typeNode.Element(!!"ref").Value))
  
  let extractDoc (indent : int) (fieldNode : XElement) =
      let indentString = new String('\t', indent)
  