Using :t I can print the type of an expression. But how do I see the constructors of that type? Also is there a shortcut for this in Haskell mode for emacs?
This seems like a basic thing, but I can't find it. Maybe I'm just searching the wrong terms...
In general, what is the easiest way to see the print the definition of a type without having to go to the documentation.
:info, or just:i, is what you want:From the GHCi documentation:
Haskell-mode in Emacs has
haskell-process-do-info(source), for which one Haskell on Emacs Tutorial recommends setting the keybindingC-c C-n C-i.