[Haskell-cafe] newtype a Constraint?

Gábor Lehel illissius at gmail.com
Tue Mar 12 14:26:38 CET 2013


{-# LANGUAGE UndecidableInstances #-}

class OldConstraint a => NewtypedConstraint a
instance OldConstraint a => NewtypedConstraint a

perhaps?

Nice thing is you don't even need to do wrapping/unwrapping, like you do
with data newtypes.


On Tue, Mar 12, 2013 at 2:18 PM, 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?
>
> Roman
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Your ship was destroyed in a monadic eruption.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130312/0d4e9a22/attachment.htm>


More information about the Haskell-Cafe mailing list