Ship

Lexicon · HM inference

HM inference

Hindley-Milner type inference: principal types from code, not defaults or guesses. Top-level bindings infer like local code, including unannotated function parameters. Annotations are optional boundary contracts. Polymorphism occurs at let-generalization boundaries. Ship infers value types, exn, eff, and modes together. See type inference.