anchor.diff:          Seq.toArray argsV
         LLVM.BuildCall(builder, calleeF, argsV, "calltmp")
   
  -  let rec codegenDecl (namedValues: Map<string, LLVMValueRef>) =
  +  let rec private codegenDecl (namedValues: Map<string, LLVMValueRef>) =
       function
       | Prototype (name, arguments) -> 
         let argumentCount = (uint32 << Seq.length) arguments
  
positive.code: 
      let parse = parseTopLevel 
    
    let parse = parseWhiteSpace >>. Decl.parse
  
    let run = runParserOnString parse () "" 
  
  
negative.code:       LLVM.VerifyFunction(function', LLVMVerifierFailureAction.LLVMPrintMessageAction) |> ignore
        function', namedValues
  
    let run decl = 
      let exe, _ = codegenDecl Map.empty decl
      LLVM.DumpValue(exe)
  
  module Driver =
  
    let [<Literal>] Preamble = "Kaleidoscope in F# and LLVM\n"
  
    // Read user input until an empty line with a return
    // TODO: pass in a reader or see if fparsec has stdin support
    let private readLines scanner =
      let rec readLinesIntoSeqAsync lines =
        async {
          let! nextLine = (scanner: TextReader).ReadLineAsync() |> Async.AwaitTask
          if String.IsNullOrEmpty(nextLine) 
            then return seq lines
            else
              do printf "-\t"
              return! readLinesIntoSeqAsync (lines @ [ nextLine ])
        } 
          
      seq { 
        yield! readLinesIntoSeqAsync [] 
          |> Async.RunSynchronously
          |> Seq.rev 
      } |> String.concat "\n"
  
    open FParsec
  
    // Main entrypoint for the driver  
    let run scanner =
      do 
        printfn "%s" Preamble
        let prompt = "ready>\t"
        let rec runRepl () =
          do 
            printf "%s" prompt
            let lines = readLines scanner
            if String.IsNullOrWhiteSpace(lines) then runRepl ()
            match Parser.run lines with
            | Failure (message, _, _) -> failwithf "☠️ %s" message
            | Success (syntax, _, _) -> Codegen.run syntax
            runRepl ()
        runRepl ()
  
  open FParsec
  
  let tests () = 
    [
      // "def foo(x y) x+foo(y, 4.0);"
      // "def foo(x y) x+y y;"
      // "def foo(x y) x+y );"
      "extern sin(a);"
    ]
    |> Seq.map (fun program ->
      async {
        let result = Parser.run program
        match result with
        | Success(tree, _,_) -> printfn "%A" tree
        | Failure(errorMessage, _, _) -> failwith errorMessage
      })
    |> Async.Parallel
    |> Async.RunSynchronously
  
  [<EntryPoint>]
  let main _ = 
    do 
  