A typed hole is a single underscore (
_) or a valid Haskell identifier which is not in scope, in an expression context. Before the existance of typed holes, both of these things would trigger an error, so the new syntax does not interfere with any old syntax.
The default behaviour of typed holes is to produce a compile-time error when encountering a typed hole. However, there are several flags to fine-tune their behaviour. These flags are summarized as follows (GHC trac):
By default GHC has typed holes enabled and produces a compile error when it encounters a typed hole.
-fdefer-typed-holesis enabled, hole errors are converted to warnings and result in runtime errors when evaluated.
The warning flag
-fwarn-typed-holesis on by default. Without
-fdefer-typed-holesthis flag is a no-op, since typed holes are an error under these conditions. If either of the defer flags are enabled (converting typed hole errors into warnings) the
-fno-warn-typed-holesflag disables the warnings. This means compilation silently succeeds and evaluating a hole will produce a runtime error.