
Tom
Please start a wiki page, somewhere under https://ghc.haskell.org/trac/ghc/wiki/Commentary
that gives the information you wish was more clearly described.
And/or add a Note in TyCoRep to explain.
My answer to your question would be:
The type that Haskell programmers write
Ord a => a -> a
is represented in Type using FunTy, thus
Ord a -> a -> a
There is no "=>" data contructor.
Instead you can tell the difference between -> and => by looking at the kind of the bit before the ->. Thus
ty1 -> ty2
if ty1 :: Constraint, then it it's a "=>" otherwise a "->".
Use (isPredTy ty1) to tell the difference.
Does that help
Simon
| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Tom
| Sydney Kerckhove
| Sent: 02 April 2017 14:02
| To: Ben Gamari