:type and :kind

Contents
  • Examples
  • Type defaulting
  • Type parameter order
    • Caveat
  • Querying kinds
    • Constraints

GHCi has always (so far as we know) had a command for querying the type of a function, and that is :type. It can be used to ask for the type of a data constructor or function, whether from your own source file or from any dependency, so long as it is in scope. Since the :kind command is so closely related to the :type command, we cover that here as well.

Sign up for access to the full page, plus the complete archive and all the latest content.