
21 May
2007
21 May
'07
1:28 p.m.
Matthew Sackman wrote:
class G a where data E a :: * wrap :: a -> E a unwrap :: E a -> a
I'm afraid not. I really need wrap to take a 'b' and unwrap to return a 'b'. Talking on #haskell to sjanssen last night, he came up with:
How does class F a where data B a :: * data E a :: * wrap :: B a -> E a unwrap :: E a -> B a sound? 'B a' would represent the 'b' in your previous attempt, class F a b | a -> b where ... Bertram