<div dir="ltr">FWIW- you can think of a 'hole' as a "not in scope" error with a ton of useful information about the type such a term would have to have in order to go in the location you referenced it.<div><br></div><div>This promotes a very useful style of type-driven development that is common in Agda, where you write out your program and then leave holes that start with _'s to fill in later. </div><div><br></div><div>Since no new programs are accepted or rejected, GHC turned on "holes" support by default. Users have historically faked this style with ImplicitParams by labeling their holes ?foo, but that approach doesn't give any information on what local stuff could be used to plug the hole.<br></div><div><br></div><div>The only thing that changed is the nature of the error message, which carefully track what variables are in scope, how they are instantiated, and what type the missing term is used at.</div><div><br></div><div><div>Since libraries like lens were already making heavy use of the _'d namespace this only happens if the name isn't already in use. This is why you can define _'d things just fine. The main thing that happened is if you typo the name of a lens, well, your error messages got even worse. ;)<br></div><div><br></div></div><div>-Edward</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 1:36 PM, Volker Wysk <span dir="ltr"><<a href="mailto:verteiler@volker-wysk.de" target="_blank">verteiler@volker-wysk.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
What is a "hole"?<br>
<br>
This program fails to compile:<br>
<br>
main = _exit 0<br>
<br>
I get this error message:<br>
<br>
ex.hs:1:8:<br>
    Found hole ‘_exit’ with type: t<br>
    Where: ‘t’ is a rigid type variable bound by<br>
               the inferred type of main :: t at ex.hs:1:1<br>
    Relevant bindings include main :: t (bound at ex.hs:1:1)<br>
    In the expression: _exit<br>
    In an equation for ‘main’: main = _exit<br>
<br>
When I replace "_exit" with "foo", it produces a "not in scope" error, as<br>
expected. What is special about "_exit"? It doesn't occur in the Haskell<br>
Hierarchical Libraries.<br>
<br>
Bye<br>
Volker<br>
<br>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div><br></div>