anchor.diff:              ) fmt
   
           for s in structs do
  -            if s.isUnion then printfn "[<StructLayout(LayoutKind.Explicit)>]"
  -            else printfn "[<StructLayout(LayoutKind.Sequential)>]"
  -
  -            printfn "type %s = " s.name
  -            printfn "    struct"
  -            for (t, n) in s.fields do
  -                let n = fsharpName n
  -
  -                if s.isUnion then
  -                    printfn "        [<FieldOffset(0)>]"
  -
  -                printfn "        val mutable public %s : %s" n (typeName t)
  -                ()
  -
  -            let fieldDefs = s.fields |> List.map (fun (t,n) -> sprintf "%s : %s" (fsharpName n) (typeName t)) |> String.concat ", "
  -            let fieldAss = s.fields |> List.map (fun (_,n) -> sprintf "%s = %s" (fsharpName n) (fsharpName n)) |> String.concat "; "
  -
  -            if not s.isUnion then
  -                printfn ""
  -                printfn "        new(%s) = { %s }" fieldDefs fieldAss
  -
  -                if s.name = "VkExtent3D" then
  -                    printfn "        new(w : int, h : int, d : int) = VkExtent3D(uint32 w,uint32 h,uint32 d)" 
  -                elif s.name = "VkExtent2D" then
  -                    printfn "        new(w : int, h : int) = VkExtent2D(uint32 w,uint32 h)" 
  -
  -
  -            let fieldSplice = s.fields |> List.map (fun (t,n) -> sprintf "%s = %%A" (fsharpName n)) |> String.concat "; "
  -            let fieldAccess = s.fields |> List.map (fun (_,n) -> sprintf "x.%s" (fsharpName n)) |> String.concat " "
  -
  -
  -            printfn "        override x.ToString() ="
  -            printfn "            sprintf \"%s { %s }\" %s" s.name fieldSplice fieldAccess
  -
  -
  -            printfn "    end"
  -            printfn ""
  -
  -            if s.name = "VkMemoryHeap" then
  -                inlineArray "VkMemoryHeap" 16 16
  -            elif s.name = "VkMemoryType" then
  -                inlineArray "VkMemoryType" 8 32
  -            elif s.name = "VkOffset3D" then
  -                inlineArray "VkOffset3D" 12 2
  +            match s.alias with
  +                | Some alias ->
  +                    printfn "type %s = %s" s.name alias
  +                | None -> 
  +            
  +                    if s.isUnion then printfn "[<StructLayout(LayoutKind.Explicit)>]"
  +                    else printfn "[<StructLayout(LayoutKind.Sequential)>]"
  +
  +
  +                    printfn "type %s = " s.name
  +                    printfn "    struct"
  +                    for (t, n) in s.fields do
  +                        let n = fsharpName n
  +
  +                        if s.isUnion then
  +                            printfn "        [<FieldOffset(0)>]"
  +
  +                        printfn "        val mutable public %s : %s" n (typeName t)
  +                        ()
  +
  +                    let fieldDefs = s.fields |> List.map (fun (t,n) -> sprintf "%s : %s" (fsharpName n) (typeName t)) |> String.concat ", "
  +                    let fieldAss = s.fields |> List.map (fun (_,n) -> sprintf "%s = %s" (fsharpName n) (fsharpName n)) |> String.concat "; "
  +
  +                    if not s.isUnion then
  +                        printfn ""
  +                        printfn "        new(%s) = { %s }" fieldDefs fieldAss
  +
  +                        if s.name = "VkExtent3D" then
  +                            printfn "        new(w : int, h : int, d : int) = VkExtent3D(uint32 w,uint32 h,uint32 d)" 
  +                        elif s.name = "VkExtent2D" then
  +                            printfn "        new(w : int, h : int) = VkExtent2D(uint32 w,uint32 h)" 
  +
  +
  +                    let fieldSplice = s.fields |> List.map (fun (t,n) -> sprintf "%s = %%A" (fsharpName n)) |> String.concat "; "
  +                    let fieldAccess = s.fields |> List.map (fun (_,n) -> sprintf "x.%s" (fsharpName n)) |> String.concat " "
  +
  +
  +                    printfn "        override x.ToString() ="
  +                    printfn "            sprintf \"%s { %s }\" %s" s.name fieldSplice fieldAccess
  +
  +
  +                    printfn "    end"
  +                    printfn ""
  +
  +                    if s.name = "VkMemoryHeap" then
  +                        inlineArray "VkMemoryHeap" 16 16
  +                    elif s.name = "VkMemoryType" then
  +                        inlineArray "VkMemoryType" 8 32
  +                    elif s.name = "VkOffset3D" then
  +                        inlineArray "VkOffset3D" 12 2
   
       let globalStructs (s : list<Struct>) =
           inlineArray "uint32" 4 32
  
positive.code: [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
  module Command =
      let tryRead (defines : Map<string, string>) (e : XElement) : Option<Command> =
          let proto = e.Element(xname "proto")
          let (returnType,name) = Type.readXmlTypeAndName defines proto
  
          let parameters =
              e.Elements(xname "param")
                  |> Seq.map (Type.readXmlTypeAndName defines)
                  |> Seq.toList
  
  
          Some { returnType = returnType; name = name; parameters = parameters }
  
  type Extension =
      {
          name            : string
  
negative.code:     let aliases (defines : Map<string, string>) (vk : XElement) =
          vk.Descendants(xname "types")
              |> Seq.collect (fun tc -> tc.Descendants (xname "type"))
              |> Seq.filter (fun t -> attrib t "category" = Some "basetype" )
              |> Seq.choose (Alias.tryRead defines)
              |> Seq.toList
  
  