Just a quick conceptual question, I am currently trying to learn and understand Haskell better.
I know the Show function is used to convert values to strings, but why can't function types be used with show?
Prelude> (x -> x*3)
<interactive>:7:1:
No instance for (Show (a0 -> a0))
arising from a use of `print'
Possible fix: add an instance declaration for (Show (a0 -> a0))
In a stmt of an interactive GHCi command: print it
Prelude>
See Question&Answers more detail:os