Skip to content

GHCi has no way to query arity of type constructor

In non-generative type constructors (type synonyms and type families), we have a property called arity, which determines how many arguments must be supplied to saturate it.

I propose to add this information into output of :info in ghci. For example:

ghci> type T :: Proxy a -> Maybe a; type T x = Nothing
ghci> :i T
type T :: forall a. Proxy a -> Maybe a
type T x = Nothing
      -- Arity: 2 (Visible: 1, Invisible: 1)
      -- Defined at <interactive>:14:31
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information