To quote a recent post by Richard Eisenberg on the haskell-cafe mailing list :
Sometimes Haddock tries to handle types with -XPolyKinds . The problem is that GHC usually does not require type arguments to be written and they do not print them (unless you say -fprint-explicit-kinds ). But I think Haddock prints views when -XPolyKinds turned on. Thus, two different definitions are really the same: just one module has -XPolyKinds , and the other does not.
* - type of ordinary types. So, Int has the form * (we write Int :: * ), and Maybe has the form * -> * . Typeable actually has the form forall k. k -> Constraint forall k. k -> Constraint , which means it is polished. In the first snippet below, the argument * to Typeable creates an instance of k using * , because a variable of type a has the form * .
So, you guessed it, this is due to PolyKinds . Haddock displays these multi-type types with a kind of "explicit view of the application." It so happened that Category is multi-like, having the form forall k. (k -> k -> *) -> Constraint forall k. (k -> k -> *) -> Constraint , so Haddock displays a view application next to each instance.
In my opinion, this is a mistake or inadequacy of Haddock, since, as far as I know, there is no analogue of the source code. This is confusing, and I donβt know a better way to understand this than to recognize the way in which it usually manifests and to visually infer what comes from the context.
source share