Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Language.Giml.Types.Infer
Description
Type inference
Our type inference algorithm works in stages:
First, we elaborate the AST and collect constraints. Then, we solve these constraints and get back a substitution. We go over the AST again, replacing the type variables we added in the elaboration stage with concrete types.
The constraints of each group of definitions are solved separately and in order.
Documentation
The state we keep during elaboration.
Constructors
ElabState | |
Fields
|
generalizeAndClose :: Type -> Type Source #