anchor.diff:  let document =
       %% ignored
       -- +.(qty.[0..] /. ignored * withSource definition)
  -    -%> fun defs -> { Definitions = defs }+    -- 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)
positive.code: let fragmentSpread =
      %% "..."
      -..- +.name
      -..- +.optionalMany directives
      -%> fun name dirs ->
          { FragmentName = name; Directives = dirs } : FragmentSpread
  
  
negative.code: 
  *)
  
  /// 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>
      -%> translatePosition
  
  /// Wraps any parser with source information.
  let withSource (parser : Parser<'a, unit>) =
      %% +.sourcePosition
      -- +.parser
  