Export ($!) from Data.Function
Yuras Shumovich
shumovichy at gmail.com
Fri Apr 24 14:18:45 UTC 2015
On Fri, 2015-04-24 at 15:51 +0200, Henning Thielemann wrote:
> On Fri, 24 Apr 2015, Yuras Shumovich wrote:
>
> > Right now ($!) operator can be imported either from Prelude or GHC.Base.
> > The later is specific to GHC, so it makes sense to avoid it.
> >
> > There are reasons to avoid Prelude too (e.g. because it pollutes name
> > space, changes too often, etc.) We need a home module for all identifies
> > from Prelude, so that one can import them without importing Prelude.
>
> I don't understand. If you don't like to import it, you can
> import Prelude hiding (($!))
>
> If you have disabled automatic import of Prelude, you can still import it
> selectively by:
> import Prelude (($!))
That is what I'm doing right now. It is too noisy because there is a
number of identifiers that live only in Prelude: error, undefined, seq,
etc. I believe they should eventually get their homes too.
>
>
> > Data.Functor seems to be a good candidate for ($!) operator home module.
> > It already exports ($) operator.
>
> I think it would better fit in a module for 'seq' and friends.
> Unfortunately there is no such module yet.
My argument for Data.Function was to unify it with ($), but
Data.Evaluate or something similar is OK for me too.
Thanks,
Yuras.
More information about the Libraries
mailing list