Skip to content

refactor: extract Shrinkable to its own non-meta module#76

Merged
kim-em merged 1 commit intomainfrom
move-shrinkable-out-of-meta
Apr 8, 2026
Merged

refactor: extract Shrinkable to its own non-meta module#76
kim-em merged 1 commit intomainfrom
move-shrinkable-out-of-meta

Conversation

@kim-em
Copy link
Copy Markdown
Collaborator

@kim-em kim-em commented Apr 8, 2026

Shrinkable and all its basic instances have no meta dependencies — they're pure functions on List, Nat, etc. Having them inside the public meta section in Sampleable.lean forces downstream users to define their Shrinkable instances as meta, which prevents them from using derived non-meta typeclass instances like BEq (due to LCNF visibility checking in Lean v4.30).

This PR extracts Shrinkable and the shrinker instances to Plausible/Shrinkable.lean (non-meta) and imports it from Sampleable.lean (both non-meta and meta, so meta code can still use it).

🤖 Prepared with Claude Code

`Shrinkable` and all its basic instances have no meta dependencies —
they're pure functions on `List`, `Nat`, etc. Having them inside the
`public meta section` in `Sampleable.lean` forces downstream users to
define their `Shrinkable` instances as meta, which prevents them from
using derived non-meta instances like `BEq` (due to LCNF visibility
checking in Lean v4.30).

Extract `Shrinkable` and the shrinker instances to
`Plausible/Shrinkable.lean` (non-meta) and import it from
`Sampleable.lean` (both non-meta and meta, so meta code can still
use it).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kim-em kim-em merged commit 2541d6b into main Apr 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant