Skip to content

Cloning: support inlining a type via clone-inline (clinline)#1021

Merged
strub merged 1 commit into
mainfrom
deploy-tyd-clinline-pr
May 31, 2026
Merged

Cloning: support inlining a type via clone-inline (clinline)#1021
strub merged 1 commit into
mainfrom
deploy-tyd-clinline-pr

Conversation

@strub
Copy link
Copy Markdown
Member

@strub strub commented May 31, 2026

Adds a 'tyd_clinline' flag to 'tydecl', the type-level analogue of the
existing 'op_clinline'. A type cloned with an inline override ('<-' or
'<=') is tagged clinline and retains its body; when it is later used as
the target of a 'theory ... <=' override, the consumer receives that
body rather than a reference to the type (the two remain convertible —
the difference shows only when printing). The replay 'ByPath' branch now
consults 'reftyd.tyd_clinline' to choose body-vs-reference, mirroring
the operator side.

All three type override paths (BySyntax / ByPath / Direct) set
tyd_clinline = (mode <> `Alias), matching the operator side exactly.

Threads the field through ecDecl, ecHiInductive, ecScope, ecSection,
ecSubst. Adds tests/clone-type-inline.ec (expect-based).

Adds a 'tyd_clinline' flag to 'tydecl', the type-level analogue of the
existing 'op_clinline'. A type cloned with an inline override ('<-' or
'<=') is tagged clinline and retains its body; when it is later used as
the target of a 'theory ... <=' override, the consumer receives that
body rather than a reference to the type (the two remain convertible —
the difference shows only when printing). The replay 'ByPath' branch now
consults 'reftyd.tyd_clinline' to choose body-vs-reference, mirroring
the operator side.

All three type override paths (BySyntax / ByPath / Direct) set
tyd_clinline = (mode <> `Alias), matching the operator side exactly.

Threads the field through ecDecl, ecHiInductive, ecScope, ecSection,
ecSubst. Adds tests/clone-type-inline.ec (expect-based).
@strub strub requested a review from Gustavo2622 May 31, 2026 07:44
@strub strub self-assigned this May 31, 2026
strub added a commit that referenced this pull request May 31, 2026
…bdep_ecCircuitsRefactor

# Conflicts:
#	src/ecDecl.ml
#	src/ecScope.ml
#	src/ecTheoryReplay.ml
@strub strub added this pull request to the merge queue May 31, 2026
Merged via the queue into main with commit f11a6d5 May 31, 2026
37 checks passed
@strub strub deleted the deploy-tyd-clinline-pr branch May 31, 2026 13:58
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.

2 participants