Files
Greg ShuflinandClaude Opus 5 9eb4d480b3 Reconcile local parser cleanup with the combinator work on master
Both sides had independently fixed the duplicate-declaration build break
(Basic.lean and Selective.lean each declared Parser, ParseResult, ParseError
and Location, and the root module imported both). Master resolved it by
gutting Selective.lean down to the class; this branch had resolved it the
other way, keeping an error-parameterized `Parser e t`.

Keep master's `Parser t` with the `parse` field: `ParseError` stays baked in,
which is simpler and matches Parsley, whose `Parsley[A]` has no error type
parameter. Drop the `Parser e t` variant entirely.

Carry over onto it the fixes that master does not have:

- The Monad instance's `pure` returned an empty remainder, discarding the
  rest of the input. Thread the input through unchanged, as the monad laws
  require and as the proof work will need.
- Give Selective's `select`/`branch` explicit type variables. They were
  unbound identifiers, so Lean auto-bound them as parameters of the class
  itself rather than as per-method implicits.
- Add the Selective instance for Parser, and a `branch` default in terms of
  `select`, so instances need only supply `select`.
- Restore `expect`, which had been commented out when the types changed.

Implement `lift2` as `f <$> zip p1 p2`; it was a stub returning
`ParseResult.ok ("", "")` at type `Parser γ`, which did not compile, so
master's HEAD was red.

Bump the toolchain 4.29.1 -> 4.33.0; the slice API needed no changes.

Add CLAUDE.md describing the project's four stages and this state.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPcEywkQGRifaT1VFXNRBL
2026-08-18 01:54:10 -07:00
..
2026-05-13 01:22:16 -07:00
2026-04-15 19:22:47 -07:00
2026-04-15 19:22:47 -07:00
2026-04-17 03:33:44 -07:00
2026-04-15 19:22:47 -07:00