anchor.diff:  #I __SOURCE_DIRECTORY__
   #load "Interactive.fsx"
   open System
  +open System.IO
   open System.Reflection
   open Prime
   open Nu
  
positive.code:     | _ -> Some NormalReturnConversion
  
  let tryGenerateBinding (method : MethodInfo) =
      let pars = Array.map getType (method.GetParameters ())
      let conversionOpts = Array.mapi (tryGetParameterConversion pars.Length) pars
      match Array.definitizePlus conversionOpts with
      | (true, conversions) ->
          let returnType = method.ReturnType
          match tryGetReturnConversion 0 returnType with
          | Some returnConversion ->
              Some
                  { MethodName = method.Name
                    MethodParameters = Array.zip conversions pars
                    MethodReturn = (returnConversion, returnType) }
          | None -> None
      | (false, _) -> None
  
  let tryGenerateBindingCode binding =
      let header =
          "   let " + binding.MethodName + " =\n" +
          "\n"
      Some header
  
  let tryGenerateBindingsCode bindings =
      let header =
          "// Nu Game Engine.\n" +
          "// Copyright (C) Bryan Edds, 2013-2017.\n" +
  
negative.code:     Array.head |>
      fun asm -> asm.GetTypes () |> Array.filter (fun ty -> isNotNull (ty.GetCustomAttribute<ModuleBindingAttribute> ()))
  
  let bindings =
      types |>
      Array.map (fun (ty : Type) -> ty.GetMethods ()) |>
      Array.concat |>
      Array.filter (fun mi -> isNotNull (mi. GetCustomAttribute<FunctionBindingAttribute> ())) |>
      Array.map tryGenerateBinding |>
      Array.definitize // TODO: error output
  
  let code =
      tryGenerateBindingsCode bindings |>
      Option.get |> // TODO: error output
      fun code -> File.WriteAllText ("Bindings.fs", code)