Haskell 2010: libraries

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Jul 10 05:08:05 EDT 2009


Simon Marlow wrote:
> Heinrich Apfelmus wrote:
>>
>> If I understand that correctly, this would mean to simply include the
>> particular version of a library that happens to be the current one at
>> the report deadline. In other words, the report specifies that say
>> version 4.1.0.0 of the base library is the standard one for 2010.
>>
>> Since old library versions are archived on hackage, this looks like a
>> cheap and easy solution to me. It's more an embellishment of alternative
>> 1. than a genuine 3.
> 
> So, just to be clear, you're suggesting that we
> 
>   - remove the whole of the Library Report,
> 
>   - declare a list of packages and versions that we consider
>     to be the standard libraries for Haskell 2010.

Yes.

> This would be a bold step, in that we would be effectively standardising
> a lot more libraries than the current language standard.  The base
> package is a fairly random bag of library modules, for instance.  It
> contains a lot of modules that are only implemented by GHC.  It contains
> backwards compatibility stuff (Control.OldException), and stuff that
> doesn't really belong (Data.HashTable).  Perhaps we could explicitly
> list the modules that the standard requires.

Oh, that sounds more bold than I expected it to be. Yes, I agree that we
should exclude modules that don't really belong; this should be cheap to
implement.

> On the other hand, this would be a useful step, in that it gives users a
> wide base of libraries to rely on.  And it's cheap to implement in the
> report.
> 
> Any other thoughts?

The way I imagine it is that the libraries thus standardized will *not*
be the libraries that most people are going to use; the latest versions
of the  base  library or the Haskell Platform will define a current set
of "standard" libraries.

Rather, I imagine the libraries standardized in the report to be a
reference for writing code that does not need to be updated when  base
or the HP change. Put differently, if I put the

  {-# LANGUAGE Haskell'2010 #-}

flag into my source code, then I'm assured that it will compile for all
eternity because my favorite compiler is going to use the  base  library
specified in the report instead of the newest  base  library available
on hackage. This requires compiler support.

In other words, this is option 1. embellished with the cheapest way of
blessing a bunch libraries for the purpose of backward compatibility.


This may not be the best solution to the  backward compatibility VS
libraries change  dilemma, but I think it reflects current practice. I
can write strict H98 if I want to, but most of the time I'm just going
to use the latest  base  anyway.



On a side note, if Haskell 2010 gets a library report, then I think this
should be in the form of a simple package on hackage, named something
like "haskell2010-libraries".


Regards,
apfelmus

--
http://apfelmus.nfshost.com



More information about the Haskell-prime mailing list