 : parser-body ( parser -- quot )
   #! Return the body of the word that is the compiled version
   #! of the parser.
-  gensym 2dup swap (compile) 0 1 <effect> define-declared swap dupd "peg" set-word-prop
+  gensym 2dup swap peg>> (compile) 0 1 <effect> define-declared swap dupd "peg" set-word-prop
   [ execute-parser ] curry ;
 
 : compiled-parser ( parser -- word )

: failed? ( obj -- ? )
  fail = ;

: delegates ( -- cache )
  \ delegates get-global [ H{ } clone dup \ delegates set-global ] unless* ;

: reset-pegs ( -- )
  H{ } clone \ delegates set-global ;

reset-pegs 


    ] if
  ] if ;

M: range-parser (compile) ( peg -- quot )
  [ min>> ] [ max>> ] bi '[ input-slice , , parse-range ] ;

TUPLE: seq-parser parsers ;
