Newcomer looking for help with changes to kind system

Ben Gamari ben at
Tue Apr 6 02:41:01 UTC 2021

Shant Hairapetian <shanth2600 at> writes:

> Hello,
> I’m a master’s student working on implementing the changes outlined in
> “Kinds are Calling Conventions“ (
> I
> have been working directly with Paul Downen but have hit some roadblocks.
> To sum up the changes to the kind system, I am attempting to modify the
> “TYPE” type constructor to accept, rather than just a RuntimeRep, a record
> type (called RuntimeInfo) comprised of a RuntimeRep and a CallingConv
> (calling convention). The calling convention has an “Eval” constructor
> which accepts a levity (effectively moving the levity information from the
> representation to the calling convention. LiftedRep and UnliftedRep would
> also be collapsed into a single PtrRep constructor) and a “Call”
> constructor (denoting the arity of primitive, extensional functions,
> see: Making
> a Faster Curry with Extensional Types
> <>)
> which accepts a list of RuntimeRep’s. I have created and wired-in the new
> RuntimeInfo and CallingConv types in GHC.Builtin.Types, as well as the
> corresponding primitive types in GHC.Builtin.Types.Prim and have modified
> the “TYPE” constructor to accept a RuntimeInfo rather than a RuntimeRep.
Hi Shant,

It would be helpful to have a bit more information on the nature of your
failure. Can you provide a program that your patch rejects, as well as
the full error that is produced?

Incidentally, the collapse of LiftedRep and UnliftedRep will happen in
GHC 9.2 (turning into `BoxedRep :: Levity -> RuntimeRep`).


- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <>

More information about the ghc-devs mailing list