[Haskell-cafe] newtype a Constraint?

Max Bolingbroke batterseapower at hotmail.com
Tue Mar 12 22:07:56 CET 2013


On 12 March 2013 13:18, Roman Cheplyaka <roma at ro-che.info> wrote:
> Is there a way to newtype a constraint?
>
> Imagine a type class parameterised over constraints. What do I do if I
> want multiple instances for (essentially) the same constraint?

It would make sense to add support for this to newtype directly. I
think it would also make sense to allow newtypes over types of kind #.
"All" that is required is some implementation effort: I looked into
doing this as part of the constraint kinds patches but it is a bit
messy.

Max



More information about the Haskell-Cafe mailing list