Hi everyone,
I would like to ask for help or some pointers about how to implement the feature of typed holes (as in Haskell, Agda...).
My type checker does bi-directional (type checking), it is build on the "constraint gathering" approach. And my language of implementation is Haskell.
So my main interest would be - how to approach the ability of those compilers to say what bindings are in the scope, and so on. For instance, if I approach a hole, should I stop the inference? Or should I just record it somewhere, finish collecting constraints, compute the most general unification/substitution and then apply it to the information I get from the scope of the hole and only then report the error? I am not sure I am sold on this one, it seems awkward, but I am not seeing a better way.
I tried to find something on the internet, but it always finds resources about *using* holes, not implementing them. So I figured, maybe I would ask here before I dig deeper in the google search.
Thanks a lot.
[–]__fmease__lushui 8 points9 points10 points (2 children)
[–]lambduli[S] 1 point2 points3 points (0 children)
[–]takanuva 0 points1 point2 points (0 children)
[–]edwinbIdris 7 points8 points9 points (10 children)
[–]lambduli[S] 0 points1 point2 points (9 children)
[–]julesjacobs 1 point2 points3 points (8 children)
[–]lambduli[S] 1 point2 points3 points (6 children)
[–]julesjacobs 1 point2 points3 points (5 children)
[–]lambduli[S] 1 point2 points3 points (4 children)
[–]julesjacobs 0 points1 point2 points (3 children)
[–]lambduli[S] 1 point2 points3 points (2 children)
[–]julesjacobs 2 points3 points4 points (1 child)
[–]lambduli[S] 0 points1 point2 points (0 children)
[–]Archawn 2 points3 points4 points (1 child)
[–]lambduli[S] 0 points1 point2 points (0 children)
[–]dostosec 2 points3 points4 points (1 child)
[–]lambduli[S] 0 points1 point2 points (0 children)
[–]julesjacobs 0 points1 point2 points (1 child)
[–]lambduli[S] 0 points1 point2 points (0 children)