[Haskell-cafe] Playing with ATs again
Victor Nazarov
asviraspossible at gmail.com
Thu Aug 5 01:21:30 EDT 2010
On Tue, Aug 3, 2010 at 9:45 PM, Ryan Ingram <ryani.spam at gmail.com> wrote:
> So I believe the "final" way to do this, which is not yet implemented,
> works something like this:
>
> type family LeftToRight a
> type family RightToLeft b
>
> class (LeftToRight a ~ b, RightToLeft b ~ a) => Bijection a b where
> ...
>
> I agree, the fact that this doesn't work is really dumb.
>
I think it is more simple like:
class Bijection a b where
...
type LeftToRight a = (Bijection a b) => b
type RightToLeft b = (Bijection a b) => a
--
Victor Nazarov
More information about the Haskell-Cafe
mailing list