Given the data type, Foo
:
Prelude> data Foo a = Foo a
It does not implement Show
, so it can't be printed.
Prelude> Foo 5
<interactive>:13:1:
No instance for (Show (Foo a0)) arising from a use of ‘print’
However, given a function that always throws:
Prelude> let f _ = error("bad!")
f
can be applied to it.
Prelude> f (Foo 5)
*** Exception: bad!
Since f
always throws for its single argument, does that mean that its argument is never evaluated, not even to Weak Head Normal Form?