Open Icelandjack opened 6 years ago
There is a Closed instance for newtype Ignore a b = Ignore b
Closed
newtype Ignore a b = Ignore b
instance Closed Ignore where closed :: forall xx b b'. Ignore b b' -> Ignore (xx -> b) (xx -> b') closed (Ignore b') = Ignore (pure @(xx ->) b')
but hm, pure works for any Applicative ("Pointed"). So maybe this is useful
pure
Applicative
Pointed
class Profunctor pro => Closed' pro where closed' :: Applicative f => pro b b' -> pro (f b) (f b')
I'm much more inclined to allow this to work for an arbitrary distributive/representable where it is actually fully sound.
Still chewing on this one. Side note: Ignore = Tagged.
Ignore
Tagged
There is a
Closed
instance fornewtype Ignore a b = Ignore b
but hm,
pure
works for anyApplicative
("Pointed
"). So maybe this is useful