2 ms·
"or any other expression" To be more precise, any other expression with an appropriate type. That's `a` or `IO a`, where `a` is an instance of `Show`. Most t
by dllthomas 11y ago
"or any other expression"
To be more precise, any other expression with an appropriate type. That's `a` or `IO a`, where `a` is an instance of `Show`.
Most things that can reasonably be Shown already have a `Show` instance, but some things (like functions) can't really.
This is relevant when the REPL shows an error like:
<interactive>:2:1:
No instance for (Show (t0 -> a0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In the first argument of ‘print’, namely ‘it’
In a stmt of an interactive GHCi command: print it