Scripting the type inference process
Bastiaan J. Heeren, Jurriaan Hage, S. Doaitse Swierstra · ACM SIGPLAN International Conference on Functional Programming (ICFP) · 2003
To improve the quality of type error messages in functional programming languages, we propose four techniques which influence the behaviour of constraint-based type inference processes. These techniques take the form of externally supplied type inference directives, precluding the need to make any changes to the compiler. A second advantage is that the directives are automatically checked for soundness with respect to the underlying type system. We show how the techniques can be used to improve the type error messages reported for a combinator library. More specifically, how they can help to generate error messages which are conceptually closer to the domain for which the library was developed. The techniques have all been incorporated in the Helium compiler, which implements a large subset of Haskell.
Cited by 67 works. doi:10.1145/944705.944707
Authors
References
- Principal type-schemes for functional programs
- Type inclusion constraints and type inference
- Type inference with constrained types
- Explaining type inference
- Proofs about a folklore let-polymorphic type inference algorithm
- A maximum-flow approach to anomaly isolation in unification-based incremental type inference
- Type error slicing in implicitly typed higher-order languages
- Explaining type errors in polymorphic languages
- Compositional explanation of types and algorithmic debugging of type errors
- Combinator Parsers: From Toys to Tools