Closed ilyakooo0 closed 4 years ago
@ilyakooo0 Yes, we are aware that this is Kleisli
, and we've introduced Fun
intentionally. And there are several reasons for this:
Kleisli
has Functor
instance only since GHC-8.10, but we want to support the latest 3 major GHC versions. With our own type, we can do this easily without CPP and orphan instances.Kleisli
sounds scarier. One of our library goal is teaching and learning material, and we want to make the concept of profunctor optics more accessible. So even beginners and Haskellers not experienced in category theory will be able to understand the concepts.Functor
instance for Kleisli
is derived and I suspect that it doesn't have {-# INLINE #-}
annotation. With our own implementation, we have more control over performance.Also, Fun
is a WIP name. If you have better begiiner-friendly suggestions (other than Kleisli
), we are happy to hear them :slightly_smiling_face:
Closing the issue since the question was answered.
It doesn't seem obvious to me why
Fun
is distinct fromKleisli
(if it is not distinct, then why reimplement it?):https://github.com/kowainik/prolens/blob/559e106d424b559a70e22df49f57a7d672ea4e65/src/Prolens.hs#L62-L65
The
Functor
instance also seems to be identical.