Proposal: Use (.) and id from Control.Category in Prelude

Herbert Valerio Riedel hvr at gnu.org
Sun Jun 15 14:13:46 UTC 2014


On 2014-06-15 at 03:18:47 +0200, Iavor Diatchki wrote:
> -2.   Please don't.  The status quo works well enough, and is sufficient
> for many many cases (in fact all I've ever encountered).  Folks who need
> more already have a perfectly reasonable way to get it: simply use the
> overloaded operators from `Control.Category`.

Maybe the underlying problem which prompts such proposals is that in
order to use more general versions of existing functions, like
e.g. Control.Categeroy or Data.Foldable, you have to go through a bit of
"ceremony" to hide the more specific versions.

I wonder if Haskell could be extended to be able to write something like

  import Data.Category

and have the more general versions of (.) and id automatically shadow
the monomorphic versions brought in scope by the Prelude.

Just a thought (which is probably not that new)

Cheers,
  hvr


More information about the Libraries mailing list