Skip to content

Conversation

@harehare
Copy link
Owner

@harehare harehare commented Nov 15, 2025

Introduces a new mq-typechecker crate that implements static type checking and type inference for the mq language using the Hindley-Milner algorithm.

Introduces a new mq-typechecker crate that implements static type checking
and type inference for the mq language using the Hindley-Milner algorithm.

Key features:
- Automatic type inference without requiring type annotations
- Support for polymorphic functions and type variables
- Integration with mq-hir for symbol and scope information
- Comprehensive error reporting with source location spans
- Built-in type signatures for operators and common functions

Architecture:
- types.rs: Type system representation and type schemes
- constraint.rs: Type constraint generation from HIR
- unify.rs: Unification algorithm implementation
- infer.rs: Inference engine coordination

This lays the foundation for static type checking in mq and will enable
better error detection, IDE support, and code optimization.
@harehare harehare force-pushed the feat/add-typechecker-crate branch from 9ffd4ee to f1eb752 Compare December 13, 2025 12:49
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