anchor.diff:  open System.Threading
   
   type FSharpParsedDocument(fileName) =
  -    inherit DefaultParsedDocument(fileName)
  +    inherit DefaultParsedDocument(fileName,Flags = ParsedDocumentFlags.NonSerializable)
       member val Tokens = None with get,set
       member val AllSymbolsKeyed = Dictionary<_,_>() with get, set
   
   module ParsedDocument =
  +    /// Format errors for the given line (if there are multiple, we collapse them into a single one)
  +    let private formatError (error : FSharpErrorInfo) =
  +      // Single error for this line
  +        let errorType =
  +            if error.Severity = FSharpErrorSeverity.Error then ErrorType.Error
  +            else ErrorType.Warning
  +        Error(errorType, String.wrapText error.Message 80, DocumentRegion (error.StartLineAlternate, error.StartColumn + 1, error.EndLineAlternate, error.EndColumn + 1))
  +        
       let create (parseOptions: ParseOptions) (parseResults: ParseAndCheckResults) defines =
         //Try creating tokens
           async {
  
positive.code:         let shortFilename = Path.GetFileName fileName
          LoggingService.LogDebug ("FSharpParser: Parse starting on {0}", shortFilename)
  
          let isObsolete filename version (token:CancellationToken) =
              SourceCodeServices.IsResultObsolete(fun () ->
                  let shortFilename = Path.GetFileName filename
                  try
                      if not token.IsCancellationRequested then
                          match MonoDevelop.tryGetVisibleDocument filename with
                          | Some doc ->
                              let newVersion = doc.Editor.Version
                              if newVersion.BelongsToSameDocumentAs(version) && newVersion.CompareAge(version) = 0 then
                                  false
                              else
                                  LoggingService.LogDebug ("FSharpParser: Parse {0} is obsolete type check cancelled, file has changed", shortFilename)
                                  true
                          | None ->
                              LoggingService.LogDebug ("FSharpParser: Parse {0} is obsolete type check cancelled, file no longer visible", shortFilename)
                              true
                      else
                          LoggingService.LogDebug ("FSharpParser: Parse {0} is obsolete type check cancelled by cancellationToken", shortFilename)
                          true
                  with ex ->
                      LoggingService.LogDebug ("FSharpParser: Parse {0} unable to determine cancellation due to exception", shortFilename, ex)
                      false )
  
          Async.StartAsTask(
              cancellationToken = cancellationToken,
              computation =
  
negative.code:                         let obsolete = isObsolete parseOptions.FileName parseOptions.Content.Version cancellationToken
                          try
                              let! pendingParseResults = Async.StartChild(languageService.ParseAndCheckFileInProject(projectFile, filePath, 0, content.Text, obsolete), ServiceSettings.maximumTimeout)
                              LoggingService.LogDebug ("FSharpParser: Parse and check results retieved on {0}", shortFilename)
                              let defines = CompilerArguments.getDefineSymbols filePath (proj |> Option.ofNull)
                              let! results = pendingParseResults
                              //if you ever want to see the current parse tree
                              //let pt = match results.ParseTree with Some pt -> sprintf "%A" pt | _ -> ""
                              return! ParsedDocument.create parseOptions results defines
                          with exn ->
                              LoggingService.LogError ("FSharpParser: Error ParsedDocument on {0}", shortFilename, exn)
                              return FSharpParsedDocument(fileName) :> _
                      | None -> return FSharpParsedDocument(fileName) :> _ })