Ashley Yakeley: > 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.
All FD programs that fulfil the weak coverage condition (which for all practical purposes is as good as all FD programs) can be translated to AT programs using a fairly simple translation scheme, as I recently realised (but I must say that it was Martin Sulzmann's AFD paper that inspired me): http://www.cse.unsw.edu.au/~chak/haskell/BetterAssociatedTypes_2fClassEqualities.html Does anybody have a similarly simple and comprehensive translation of FDs to ATs? Manuel _______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://haskell.org/mailman/listinfo/haskell-prime