anchor.diff:                                      file,
                                       text)
             agent.TriggerParseRequest(opts, full)
  -          Console.WriteLine("DONE: Background parsing started")
  +          Console.WriteLine("INFO: Background parsing started")
             main { state with Files = Map.add file lines state.Files }
           else
  -          Console.WriteLine(sprintf "ERROR: File '%s' does not exist" file)
  +          printfn "ERROR: File '%s' does not exist" file
             main state
   
       | Project file ->
           // Load project file and store in state
           if File.Exists file then
             match ProjectParser.load file with
  -          | Some p -> Console.WriteLine("DONE: Project loaded")
  +          | Some p -> Console.WriteLine("INFO: Project loaded")
                         main { state with Project = Some p }
  -          | None   -> Console.WriteLine(sprintf "ERROR: Project file '%s' is invalid" file)
  +          | None   -> printfn "ERROR: Project file '%s' is invalid" file
                         main state
           else
  -          Console.WriteLine(sprintf "ERROR: File '%s' does not exist" file)
  +          printfn "ERROR: File '%s' does not exist" file
             main state
   
       // TODO: Refactor error checking of next four cases
       | Declarations file ->
           let file = Path.GetFullPath file
  -        if not (Map.containsKey file state.Files)
  -        then
  -          Console.WriteLine(sprintf "ERROR: File '%s' not parsed" file)
  -          Console.WriteLine("<<EOF>>")
  -        else
  +        if parsed file then
             let lines = state.Files.[file]
             let text = String.concat "\n" lines
             let opts = RequestOptions(agent.GetCheckerOptions(file, text, state.Project),
  
positive.code:     project ""<filename>""
        - associates the current session with the specified project"
  
    // Command that can be entered on the command-line
    type Command =
      | Completion of string * Position * int option
  
negative.code:   let agent = new IntelliSenseAgent()
  
    let rec main (state:State) : int =
      let parsed file =
        let b = Map.containsKey file state.Files
        if not b then printfn "ERROR: File '%s' not parsed" file
        b
  
      /// Is the specified position consistent with internal state of file?
      let posok file line col =
        let lines = state.Files.[file]
        let b = line >= lines.Length || line < 0 ||
                column > lines.[line].Length || column < 0
        if b then Console.WriteLine("ERROR: Position is out of range")
        b
      
      Debug.print "main state is:\nproject: %b\nfiles: %A"
                  (Option.isSome state.Project)
                  (Map.fold (fun ks k _ -> k::ks) [] state.Files)
      match parseCommand(Console.ReadLine()) with
      | GetErrors ->
          let errs = agent.GetErrors()
          let msg =
            [ for e in errs do yield
                sprintfn "[%d:%d-%d:%d] %s %s"
                         e.StartLine
                         e.StartColumn
                         e.EndLine
                         e.EndColumn
                         (if e.Severity = Severity.Error then "ERROR" else "WARNING")
                         e.Message ]
            |> String.concat ""
          printfn "DATA: errors %d %s" (String.length msg) msg
          main state
  
      | Parse(file,full) ->
  