[Haskell-cafe] redefining a type class for one instance?

2011-04-12 Thread Edward Amsden
I am trying as an experiment to write something as follows: data Wrapper a b where Pure :: (a - b) - Wrapper a b Nullable :: (Maybe a - b) - Wrapper a b class Liftable a b where liftTo :: (b - c) - a b c instance Liftable Wrapper a where liftTo = Pure instance Liftable Wrapper (Maybe

Re: [Haskell-cafe] redefining a type class for one instance?

2011-04-12 Thread Henning Thielemann
On Tue, 12 Apr 2011, Edward Amsden wrote: I am trying as an experiment to write something as follows: data Wrapper a b where Pure :: (a - b) - Wrapper a b Nullable :: (Maybe a - b) - Wrapper a b class Liftable a b where liftTo :: (b - c) - a b c instance Liftable Wrapper a where liftTo

Re: [Haskell-cafe] redefining a type class for one instance?

2011-04-12 Thread Edward Amsden
On Tue, Apr 12, 2011 at 3:13 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Tue, 12 Apr 2011, Edward Amsden wrote: I am trying as an experiment to write something as follows: data Wrapper a b where  Pure :: (a - b) - Wrapper a b  Nullable :: (Maybe a - b) - Wrapper a b