Suggesting valid hole fits for typed-holes (experience report)
Paper in proceeding, 2018

Type systems allow programmers to communicate a partial specification of their program to the compiler using types, which can then be used to check that the implementation matches the specification. But can the types be used to aid programmers during development? In this experience report I describe the design and implementation of my lightweight and practical extension to the typed-holes of GHC that improves user experience by adding a list of valid hole fits and refinement hole fits to the error message of typed-holes. By leveraging the type checker, these fits are selected from identifiers in scope such that if the hole is substituted with a valid hole fit, the resulting expression is guaranteed to type check.

Suggestions

Valid Hole Fits

GHC

Typed-Holes

Author

Matthías Páll Gissurarson

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Haskell 2018 - Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell, co-located with ICFP 2018

179-185
978-145035835-4 (ISBN)

11th ACM SIGPLAN International Symposium on Haskell, Haskell 2018, co-located with ICFP 2018
St. Louis, USA,

Subject Categories

Computer Engineering

Information Science

Computer Science

DOI

10.1145/3242744.3242760

More information

Latest update

4/21/2023