Class ATs Question

Ashley Yakeley ashley at semantic.org
Thu Apr 27 21:09:07 EDT 2006


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/



More information about the Haskell-prime mailing list