row-polymorphism icon indicating copy to clipboard operation
row-polymorphism copied to clipboard

Qualified types

Open atennapel opened this issue 7 years ago • 2 comments

In the constrained rows implementation the lacks constraints are part of the type variables instead of being part of the type schemes like it is in the papers I read about row polymorphism, where qualified types are used. I was wondering if you knew an implementation of row polymorphism that uses qualified types? I am having trouble implementing it myself.

Specifically I'm talking about the paper: "A Polymorphic Type System for Extensible Records and Variants" by Benedict R. Gaster and Mark P. Jones.

atennapel avatar Aug 07 '17 12:08 atennapel

Apologies for the late reply. You are absolutely correct that the implementation here does not use full qualified types. That is really part of the point of this code, to prove that it can be implemented as a very simple extension. If you did want to use qualified types, for example you also want type classes, then Mark Jones has a paper "Typing Haskell in Haskell" which shows how to add it. Good luck!

willtim avatar Aug 13 '17 14:08 willtim

Thanks for the reply! Yeah type classes is exactly the reason why I became interested in Qualified types, thanks for the paper suggestion!

atennapel avatar Aug 13 '17 15:08 atennapel