show
is the function that is defined on functions that are members of the Show
typeclass (if you don't know what a typeclass is, it's kinda like an OOP interface).
By default, functions are not members of the typeclass, so we can't print them.
We could make it a member of the typeclass with
instance Show (a -> b) where
show f = "Unicorns!!"
but here we realize why it isn't implemented by default. There isn't a simple, obvious representation of functions and haskell doesn't want to guess, and thus no instance.
The only "permissible" instance would be one that actually prints out the function, but this would require actual language change, ie it would be hardwired into the compiler, which just isn't worth it for the few cases in which it could be useful.
Further more it's a nontrivial compiler change, Haskell is compiled which means the differences between something like f = g
and
f = g
are entirely lost on it. But you'd definitely want that in your function representation. Because of this, you'd have to lug around this string through out the program. This is definitely not what you want in a binary.
If you really want it to print unicorns!! though, feel free.