On Dec 4, 2016 12:22 AM, "David Menendez" <dave@zednenem.com> wrote:You can also use it with contra-variant or invariant type constructors, e.g.,instance Siftable a (a -> Bool) wheresift f g = \x -> f x && g xThat looks backwards for your composition law, but I'm a bit tired so I wouldn't swear to it.
Surely you can do the same with the constructor class.newtype Ab a = Ab (a -> Bool)instance Siftable Ab wheresiftAway _ = Ab (const False)sift p (Ab g) = Ab ...
I'm not sure if my siftAway excludes anything it shouldn't....