You can do two-way fundeps. Can these be done with associated types? For instance:

  class HasSign u s | u -> s, s -> u where
    unsignedToSigned :: u -> s
    signedToUnsigned :: s -> u

  instance HasSign Word8 Int8 where
    ...

It might not be a great loss if not.

--
Ashley Yakeley, Seattle WA
WWEWDD? http://www.cs.utexas.edu/users/EWD/

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://haskell.org/mailman/listinfo/haskell-prime

Reply via email to