anchor.diff:      |> List.map generateCDeclFunctionPointerImpl
       |> List.reduce (fun x y -> x + "\n" + y)
   
  -let generateHeader (env: CEnv) includes =
  -    let structs = generateCDeclStructs env.DeclStructs
  -    let funcPtrs = generateCDeclFunctionPointers env.DeclFunctionPointers
  -
  -    sprintf "%s\n%s\n%s" includes structs funcPtrs
  +let generateHeader env includes =
  +    let decls = generateCDecls CGenContext.Header env.Decls
  +
  +    sprintf "%s\n%s" includes decls
       |> generateMainHeaderCode env.Name
   
   let generateSource (env: CEnv) =
       (generateHeaderIncludeCode env.Name) + 
  -    generateCDeclFunctions env.DeclFunctions +
  +    generateCDecls CGenContext.Source env.Decls +
       generateCDeclFunctionPointerImpls env.DeclFunctionPointers
   
   let generate env includes =
  
positive.code: let generateCDeclStruct {CDeclStruct.Name=name; Fields=fields} =
      generateCDeclStructCode (generateCFields fields) name
  
  let generateCDecl = function
      | Function x ->             generateCDeclFunction x
      | FunctionPrototype x ->    generateCDeclFunctionPrototype x
      | FunctionPointer x ->      generateCDeclFunctionPointer x
      | Struct x ->               generateCDeclStruct x
  
  let generateCDeclFunctionPointerImpl {CDeclFunctionPointer.Name=name} =
      genereateCDeclFunctionPointerImplCode name
  
  let generateCDeclFunctions = function
      | [] -> ""
      | funcs -> 
  
      funcs
      |> List.map generateCDeclFunction
      |> List.reduce (fun x y -> x + "\n" + y)
  
  let generateCDeclStructs = function
      | [] -> ""
      | structs -> 
  
      structs
      |> List.map generateCDeclStruct
      |> List.reduce (fun x y -> x + "\n" + y)
  
  let generateCDeclFunctionPointers = function
      | [] -> ""
      | funcs -> 
  
      funcs
      |> List.map generateCDeclFunctionPointer
      |> List.reduce (fun x y -> x + "\n" + y)
  
  let generateCDeclFunctionPointerImpls = function
      | [] -> ""
  
negative.code: type CGen = {
      Header : string
      Source : string }
  
  type CGenContext =
      | Header = 0
      | Source = 1
  
  let generateHeaderCode (name : string) header =
      let name = name.ToUpper ()
  