I know it is not possible to show the function's body since Haskell carries out optimisations, but is it possible to somehow show it's name?
I would like something like
Prelude> f
[Function f]
similar to what other REPL's do (Python, javascript, etc.)
What I get with Haskell is
Prelude> f
<interactive>:2:1: error:
• No instance for (Show (Integer -> Integer)) arising from a use of ‘print’ (maybe you haven't applied a function to enough arguments?)
• In a stmt of an interactive GHCi command: print it
which is not helpful in demonstrations.