Skip to content

Add initial draft of Pact type system formal specification#1

Open
colinrozzi wants to merge 1 commit intomainfrom
codex/review-code-implementation
Open

Add initial draft of Pact type system formal specification#1
colinrozzi wants to merge 1 commit intomainfrom
codex/review-code-implementation

Conversation

@colinrozzi
Copy link
Copy Markdown
Owner

Motivation

  • Introduce a precise, implementer-facing formalization of Pact's type system to guide type checker, trait, and interface design.
  • Capture decisions and open questions around parametric polymorphism, trait-constrained generics, interface transforms, and ABI compatibility.

Description

  • Add a new draft specification file at docs/spec/TYPE-SYSTEM-SPEC-DRAFT.md that defines the core semantic model, syntactic categories, and an initial kind system.
  • Specify static semantics with judgments for well-formed types, type declarations, trait declarations, and interface declarations, along with an HM-style constraint/inference outline.
  • Propose a candidate coherence rule for trait implementations and describe interfaces as algebraic objects with union/extension operations and canonical normalization rules.
  • Define transforms as typed, terminating rewrites, state ABI boundary rules, list soundness targets, and enumerate open questions and a proposed PR sequence toward normative rules.

Testing

  • No automated tests were added or executed for this documentation-only draft.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant