Polymorphism in the Prelude

Edward Kmett ekmett at gmail.com
Tue Jun 17 14:29:13 UTC 2014


ghc-pkg hide base
ghc-pkg expose haskell2010

Now when you run ghc from the command line or start ghci you'll get
haskell2010 by default.

Vice versa to switch back.

-Edward


On Tue, Jun 17, 2014 at 10:24 AM, Richard Eisenberg <eir at cis.upenn.edu>
wrote:

> Forgive a perhaps newbie question, but: How do I use the haskell2010
> package? An earlier recommendation in this thread for novices is to "use
> haskell2010" to reduce the upcoming extra polymorphism in the prelude. How
> is this done, in practice? My guess is that we have to use several
> command-line flags to hide the `base` package and make the `haskell2010`
> package visible. Some experimenting got `ghc -package haskell2010
> -hide-package base Foo.hs` to work. These flags can't even be embedded in
> an OPTIONS_GHC pragma.
>
> In any case, it's a bit of a hoop for novices to jump through, especially
> if they aren't being guided by a teacher.
>
> I tend to agree that taxing the large quantity of experienced users for
> the benefit of novices is wrong-headed. But, I still think we need a nice,
> simple story to get new folks off the ground. Haskell prides itself on its
> beauty, and requiring several obscure and (at first) inscrutable command
> line flags to get decent error messages for a novice is not beautiful.
>
> Richard
>
> On Jun 17, 2014, at 7:58 AM, Edward Kmett <ekmett at gmail.com> wrote:
>
> On Tue, Jun 17, 2014 at 3:59 AM, Greg Weber <greg at gregweber.info> wrote:
>
>>
>> On Mon, Jun 16, 2014 at 10:33 AM, Edward Kmett <ekmett at gmail.com> wrote:
>>
>>> Based on raw download stats:
>>>
>>> basic-prelude has probably received the most traction. It has ~8k
>>> downloads.
>>>
>>> classy-prelude decays to ~4k downloads.
>>>
>>> general-prelude ~180.
>>>
>>> The other two I mentioned have had ~100 each.
>>>
>>> By way of comparison something like, say, 'profunctors' has ~50k
>>> downloads.
>>>
>>
>> That is interesting, thank you for sharing! Are you using direct
>> downlaods of profunctor? because profunctor is designed to be a library
>> dependency (lens depends on it as do 20+ other packages), whereas with
>> classy-prelude users are advised to not use it as a library dependency and
>> only use it for their applications. There is only really one library with
>> usage that depend on classy-prelude, classy-prelude-conduit, and only
>> classy-prelude-yesod depends on that, and nothing depends on that, they are
>> all designed for application writers, not as library dependencies.
>>
>> Does it makes sense to make a direct comparison of total downloads for
>> these 2 different use cases?
>>
>
> It isn't a perfect comparison, but if we're looking at adoption, adoption
> is adoption regardless of whether the library is sold for a very limited
> application-oriented usecase. Haskell is the sum of library authors and
> application authors (and students who will probably never write a library).
> All we're doing is bringing the non-controversial parts of base that people
> already use every day into the standard Prelude, where it can benefit each
> group.
>
> A proposal that says "well, application authors can just use X" ignores
> the large mass of library authors out there when it just doesn't have to.
> we have a straightforward path to monotonic improvement over the status
> quo, lets take it.
>
> Again, my reaction is mostly measured by the fact that I've actively asked
> folks in person about this as I travel around to user groups and ask "what
> is it that the core library committee could do that would make Haskell
> better for you" and have received a lot of feedback, it isn't just driven
> by those numbers.
>
> -Edward
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140617/046b006e/attachment.html>


More information about the Libraries mailing list