anchor.diff:  
   *)
   
  -// Translates from FParsec's position type to our own.
  +/// Translates from FParsec's position type to our own.
  +let translatePosition (pos : Position) = { Index = pos.Index; Line = pos.Line; Column = pos.Column }
  +
  +/// Get the source position the parser is currently at.
   let sourcePosition =
       %% +.p<Position>
  -    -%> fun pos -> { Index = pos.Index; Line = pos.Line; Column = pos.Column }
  -
  -// Wraps any parser with source information.
  +    -%> translatePosition
  +
  +/// Wraps any parser with source information.
   let withSource (parser : Parser<'a, unit>) =
       %% +.sourcePosition
       -- +.parser
  
positive.code: let fragmentSpread =
      %% "..."
      -..- +.name
      -..- +.optionalMany directives
      -%> fun name dirs ->
          { FragmentName = name; Directives = dirs } : FragmentSpread
  
  
negative.code: let document =
      %% ignored
      -- +.(qty.[0..] /. ignored * withSource definition)
      -- eof
      -%> fun defs -> { Definitions = defs }
  
  let parseDocument (source : string) =
      match run document source with
      | Success(doc, (), pos) -> doc
      | Failure(msg, err, ()) ->
          raise <| new ParsingException(msg, translatePosition err.Position)