"Found hole"

Volker Wysk verteiler at volker-wysk.de
Tue Jan 20 18:36:09 UTC 2015


What is a "hole"? 

This program fails to compile:

main = _exit 0

I get this error message:

    Found hole ‘_exit’ with type: t
    Where: ‘t’ is a rigid type variable bound by
               the inferred type of main :: t at ex.hs:1:1
    Relevant bindings include main :: t (bound at ex.hs:1:1)
    In the expression: _exit
    In an equation for ‘main’: main = _exit

When I replace "_exit" with "foo", it produces a "not in scope" error, as 
expected. What is special about "_exit"? It doesn't occur in the Haskell 
Hierarchical Libraries.


More information about the Glasgow-haskell-users mailing list