|
CONVERSION ERROR
|
|
# Package Reorg
|
|
|
|
|
|
Error: HttpError (HttpExceptionRequest Request {
|
|
|
|
host = "ghc.haskell.org"
|
|
In this page we collect proposals and design discussion for
|
|
port = 443
|
|
reorganising the packages that come with compilers, and the contents
|
|
secure = True
|
|
of those packages.
|
|
requestHeaders = []
|
|
|
|
path = "/trac/ghc/wiki/Commentary/Packages/PackageReorg"
|
|
|
|
queryString = "?version=12"
|
|
None of the ideas herein are claimed to belong to any particular
|
|
method = "GET"
|
|
person, many of the ideas have been extracted from mailing list
|
|
proxy = Nothing
|
|
discussions, eg.
|
|
rawBody = False
|
|
|
|
redirectCount = 10
|
|
> [ http://www.haskell.org/pipermail/libraries/2006-November/006396.html](http://www.haskell.org/pipermail/libraries/2006-November/006396.html)
|
|
responseTimeout = ResponseTimeoutDefault
|
|
|
|
requestVersion = HTTP/1.1
|
|
|
|
}
|
|
Some of the points are GHC-specific. Please feel free to insert
|
|
(StatusCodeException (Response {responseStatus = Status {statusCode = 403, statusMessage = "Forbidden"}, responseVersion = HTTP/1.1, responseHeaders = [("Date","Sun, 10 Mar 2019 06:59:25 GMT"),("Server","Apache/2.2.22 (Debian)"),("Strict-Transport-Security","max-age=63072000; includeSubDomains"),("Vary","Accept-Encoding"),("Content-Encoding","gzip"),("Content-Length","262"),("Content-Type","text/html; charset=iso-8859-1")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>403 Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\n<p>You don't have permission to access /trac/ghc/wiki/Commentary/Packages/PackageReorg\non this server.</p>\n<hr>\n<address>Apache/2.2.22 (Debian) Server at ghc.haskell.org Port 443</address>\n</body></html>\n"))
|
|
points specific to other compilers.
|
|
|
|
|
|
Original source:
|
|
## Goals
|
|
|
|
|
|
```trac
|
|
- It would be good to have set of packages that is installed with
|
|
[[PageOutline]]
|
|
every Haskell implementation. This seems to be Bulat's main point
|
|
= Package Reorg =
|
|
in the thread above.
|
|
|
|
- It should be possible to upgrade any package, even if that package
|
|
In this page we collect proposals and design discussion for
|
|
came with the compiler.
|
|
reorganising the packages that come with compilers, and the contents
|
|
|
|
of those packages.
|
|
## Proposal
|
|
|
|
|
|
None of the ideas herein are claimed to belong to any particular
|
|
|
|
person, many of the ideas have been extracted from mailing list
|
|
Here's a straw-man proposal
|
|
discussions, eg.
|
|
|
|
|
|
|
|
[http://www.haskell.org/pipermail/libraries/2006-November/006396.html]
|
|
- There is a set of packages that come with every conforming Haskell
|
|
|
|
implementation. Let's call these the **Core Packages** to
|
|
Some of the points are GHC-specific. Please feel free to insert
|
|
avoid confusion (Bulat called these the "base packages", but that's an
|
|
points specific to other compilers.
|
|
over-used term given that there is a package called `base`).
|
|
|
|
The good thing about the Core Packages is that
|
|
== Goals ==
|
|
users know that they will be there, and they are consistent with
|
|
|
|
each other.
|
|
* It would be good to have set of packages that is installed with
|
|
|
|
every Haskell implementation. This seems to be Bulat's main point
|
|
- Any particular implementation may install more packages by default;
|
|
in the thread above.
|
|
for example GHC will install the `template-haskell` and `stm`
|
|
* It should be possible to upgrade any package, even if that package
|
|
packages. Let's call these the **GHC Install Packages**, **Hugs
|
|
came with the compiler.
|
|
Install Packages** etc; the Install Packages are a superset of the
|
|
|
|
Core Packages.
|
|
== Proposal ==
|
|
|
|
|
|
### What is in the Core Packages?
|
|
Here's a straw-man proposal
|
|
|
|
|
|
|
|
* There is a set of packages that come with every conforming Haskell
|
|
The Core Packages are installed with every conforming Haskell implementation. What should be in the Core? There is a tension:
|
|
implementation. Let's call these the '''Core Packages''' to
|
|
|
|
avoid confusion (Bulat called these the "base packages", but that's an
|
|
1. **As much as possible**; which means in practice widely-used and reasonably stable packages. It is convenient for programmers to have as much as possible in a consistent, bundle that is (a) known to work together bundle, and (b) known to work on all implementations.
|
|
over-used term given that there is a package called `base`).
|
|
1. **As little as possible**; which in practice means enough to run Cabal so that you can run the Setup files that come when downloading new packages. As Ian puts it: the less we force the implementations to come with, the quicker compilation will be when developing, the smaller Debian packages (for example) can be, the lower the disk space requirements to build GHC, the lower the time wasted when a Debian package (for example) build fails and the fewer packages we are tangling up with compiler release schedules.
|
|
The good thing about the Core Packages is that
|
|
|
|
users know that they will be there, and they are consistent with
|
|
|
|
each other.
|
|
There's a real choice here: Bulat wants (1) and Ian wants (2).
|
|
|
|
|
|
* Any particular implementation may install more packages by default;
|
|
|
|
for example GHC will install the `template-haskell` and `stm`
|
|
Initial stab at (1):
|
|
packages. Let's call these the '''GHC Install Packages''', '''Hugs
|
|
|
|
Install Packages''' etc; the Install Packages are a superset of the
|
|
- `base`
|
|
Core Packages.
|
|
- `Cabal`
|
|
|
|
- `haskell98`
|
|
=== What is in the Core Packages? ===
|
|
- Some `regex` packages (precisely which?)
|
|
|
|
- `unix` or `Win32`. Questionable, partly because it means the Core interface becomes platform-dependent; and partly because `Win32` would double the size of the Hugs distribution.
|
|
The Core Packages are installed with every conforming Haskell implementation. What should be in the Core? There is a tension:
|
|
- `parsec`
|
|
|
|
- `mtl`
|
|
1. '''As much as possible'''; which means in practice widely-used and reasonably stable packages. It is convenient for programmers to have as much as possible in a consistent, bundle that is (a) known to work together bundle, and (b) known to work on all implementations. [[BR]][[BR]]
|
|
- `time`
|
|
2. '''As little as possible'''; which in practice means enough to run Cabal so that you can run the Setup files that come when downloading new packages. As Ian puts it: the less we force the implementations to come with, the quicker compilation will be when developing, the smaller Debian packages (for example) can be, the lower the disk space requirements to build GHC, the lower the time wasted when a Debian package (for example) build fails and the fewer packages we are tangling up with compiler release schedules.
|
|
- `network`
|
|
|
|
- `QuickCheck` (questionable)
|
|
There's a real choice here: Bulat wants (1) and Ian wants (2).
|
|
- `HUnit` (questionable)
|
|
|
|
|
|
Initial stab at (1):
|
|
|
|
|
|
Initial stab at (2):
|
|
* `base`
|
|
|
|
* `Cabal`
|
|
- `base`
|
|
* `haskell98`
|
|
- `haskell98`
|
|
* Some `regex` packages (precisely which?)
|
|
- `Cabal`
|
|
* `unix` or `Win32`
|
|
- `filepath`
|
|
* `parsec`
|
|
|
|
* `mtl`
|
|
|
|
* `time`
|
|
Bulat: i think that all regex packages should be included and of course libs that helps testing. overall, it should be any general-purpose lib that porters accept (emlarging these sets makes users live easier, and porters live harder)
|
|
* `network`
|
|
|
|
* `QuickCheck` (questionable)
|
|
### The base package
|
|
* `HUnit` (questionable)
|
|
|
|
|
|
|
|
Initial stab at (2):
|
|
The base package is a bit special
|
|
* `base`
|
|
|
|
* `haskell98`
|
|
- Package `base` is rather big at the moment.
|
|
* `Cabal`
|
|
|
|
* `filepath`
|
|
- From a user's point of view it would be nicer to give it a
|
|
|
|
compiler-independent API. (A module like `GHC.Exts` would move to
|
|
Bulat: i think that all regex packages should be included and of course libs that helps testing. overall, it should be any general-purpose lib that porters accept (emlarging these sets makes users live easier, and porters live harder)
|
|
a new package `ghc-base`.)
|
|
|
|
|
|
=== The base package ===
|
|
|
|
|
|
Thinking of GHC alone for a moment, we could have a package `ghc-base`
|
|
The base package is a bit special
|
|
(which is pretty much the current `base`) and a thin wrapper package
|
|
|
|
`base` that re-exposes some, but not all, of what `ghc-base` exposes.
|
|
* Package `base` is rather big at the moment.
|
|
To support this re-exposing, we need a small fix to both GHC and
|
|
|
|
Cabal, but one that is independently desirable.
|
|
* From a user's point of view it would be nicer to give it a
|
|
|
|
compiler-independent API. (A module like `GHC.Exts` would move to
|
|
|
|
a new package `ghc-base`.)
|
|
Similarly, Hugs could build `hugs-base` from the same souce code, by
|
|
|
|
using CPP-ery, exactly as now. The thin `base` wrapper package
|
|
Thinking of GHC alone for a moment, we could have a package `ghc-base`
|
|
would not change.
|
|
(which is pretty much the current `base`) and a thin wrapper package
|
|
|
|
`base` that re-exposes some, but not all, of what `ghc-base` exposes.
|
|
|
|
To support this re-exposing, we need a small fix to both GHC and
|
|
To make `base` smaller, we could remove stuff, and put it into
|
|
Cabal, but one that is independently desirable.
|
|
separate packages. But be careful: packages cannot be cyclic, so
|
|
|
|
anything that is moved out can't be used in `base`.
|
|
Similarly, Hugs could build `hugs-base` from the same souce code, by
|
|
Some chunks that would currently be easy to split off are:
|
|
using CPP-ery, exactly as now. The thin `base` wrapper package
|
|
|
|
would not change.
|
|
- Data.ByteString.\* (plus future packed Char strings)
|
|
|
|
- Control.Applicative (?), Data.Foldable, Data.Monoid (?), Data.Traversable, Data.Graph, Data.IntMap, Data.IntSet, Data.Map, Data.Sequence, Data.Set, Data.Tree
|
|
To make `base` smaller, we could remove stuff, and put it into
|
|
- System.Console.GetOpt
|
|
separate packages. But be careful: packages cannot be cyclic, so
|
|
- Text.PrettyPrint.\*
|
|
anything that is moved out can't be used in `base`.
|
|
- Text.Printf
|
|
Some chunks that would currently be easy to split off are:
|
|
|
|
* Data.!ByteString.* (plus future packed Char strings)
|
|
|
|
* Control.Applicative (?), Data.Foldable, Data.Monoid (?), Data.Traversable, Data.Graph, Data.!IntMap, Data.!IntSet, Data.Map, Data.Sequence, Data.Set, Data.Tree
|
|
Some other things, such as arrays and concurrency, have nothing else depending on them, but are so closely coupled with GHC's internals that extracting them would require exposing these internals in the interface of `base`.
|
|
* System.Console.!GetOpt
|
|
|
|
* Text.!PrettyPrint.*
|
|
|
|
* Text.Printf
|
|
Bulat: my ArrayRef library contains portable implementation of arrays. there is only thin ghc/hugs-specific layer which should be provided by ghcbase/hugsbase libs. except for MPTC problem (IArray/MArray classes has multiple parameters), this library should be easily portable to any other haskell compiler
|
|
Some other things, such as arrays and concurrency, have nothing else depending on them, but are so closely coupled with GHC's internals that extracting them would require exposing these internals in the interface of `base`.
|
|
|
|
|
|
### Other packages
|
|
Bulat: my ArrayRef library contains portable implementation of arrays. there is only thin ghc/hugs-specific layer which should be provided by ghcbase/hugsbase libs. except for MPTC problem (IArray/MArray classes has multiple parameters), this library should be easily portable to any other haskell compiler
|
|
|
|
|
|
|
|
=== Other packages ===
|
|
Other non-core packages would probably have their own existence. That
|
|
|
|
is, they don't come with an implementation; instead you use
|
|
Other non-core packages would probably have their own existence. That
|
|
`cabal-get`, or some other mechanism, such as your OS's package
|
|
is, they don't come with an implementation; instead you use
|
|
manager. Some of these currently come with GHC, and would no longer do
|
|
`cabal-get`, or some other mechanism, such as your OS's package
|
|
so
|
|
manager. Some of these currently come with GHC, and would no longer do
|
|
|
|
so
|
|
- `GLUT`
|
|
|
|
- `ALUT`
|
|
* `GLUT`
|
|
- `OpenAL`
|
|
* `ALUT`
|
|
- `OpenGL`
|
|
* `OpenAL`
|
|
- `HGL`
|
|
* `OpenGL`
|
|
- `HUnit`
|
|
* `HGL`
|
|
- `ObjectIO`
|
|
* `HUnit`
|
|
- `X11`
|
|
* `ObjectIO`
|
|
- `arrows`
|
|
* `X11`
|
|
- `cgi`
|
|
* `arrows`
|
|
- `fgl`
|
|
* `cgi`
|
|
- `html`
|
|
* `fgl`
|
|
- `xhtml`
|
|
* `html`
|
|
|
|
* `xhtml`
|
|
|
|
|
|
Bulat: i propose to unbundle only graphics/sound libs because these solves particular problems and tends to be large, non-portable (?) and just legacy ones - like ObjectIO. we should keep everything small & general purpose, including HUnit, arraows, fgl, html and xhtml, and include even more:
|
|
Bulat: i propose to unbundle only graphics/sound libs because these solves particular problems and tends to be large, non-portable (?) and just legacy ones - like ObjectIO. we should keep everything small & general purpose, including HUnit, arraows, fgl, html and xhtml, and include even more:
|
|
|
|
|
|
|
|
ByteString, regex-*, Edison, Filepath, MissingH, NewBinary, QuickCheck, monads
|
|
ByteString, regex-\*, Edison, Filepath, MissingH, NewBinary, QuickCheck, monads
|
|
|
|
|
|
== Testing ==
|
|
## Testing
|
|
|
|
|
|
We should separate out package-specifc tests, which should be part of
|
|
|
|
the repository for each package. Currently they are all squashed
|
|
We should separate out package-specifc tests, which should be part of
|
|
together into the testsuite repository.
|
|
the repository for each package. Currently they are all squashed
|
|
|
|
together into the testsuite repository.
|
|
|
|
|
|
== Implementation-specific notes ==
|
|
## Implementation-specific notes
|
|
=== Notes about GHC ===
|
|
|
|
|
|
### Notes about GHC
|
|
Currently GHC installs a set of packages by default: base, stm,
|
|
|
|
template-haskell, cabal, haskel98, readline, 3 of the 5 regex
|
|
|
|
packages. These are exactly the libraries required to build GHC.
|
|
Currently GHC installs a set of packages by default: base, stm,
|
|
That shouldn't be the criterion. This set of packages are currently
|
|
template-haskell, cabal, haskel98, readline, 3 of the 5 regex
|
|
called GHC's "core packages", but should be renamed to '''GHC Boot
|
|
packages. These are exactly the libraries required to build GHC.
|
|
Packages'''.
|
|
That shouldn't be the criterion. This set of packages are currently
|
|
|
|
called GHC's "core packages", but should be renamed to **GHC Boot
|
|
One reason we do this is because it means that every GHC installation
|
|
Packages**.
|
|
can build GHC. Less configure-script hacking. (NB: even today if you
|
|
|
|
upgrade any of these packages, and then build GHC, the build might
|
|
|
|
fail because the CPP-ery in GHC's sources uses only the version number
|
|
One reason we do this is because it means that every GHC installation
|
|
of GHC, not the version number of the package.)
|
|
can build GHC. Less configure-script hacking. (NB: even today if you
|
|
|
|
upgrade any of these packages, and then build GHC, the build might
|
|
Still, for convenience we'd probably arrange that the GHC Install
|
|
fail because the CPP-ery in GHC's sources uses only the version number
|
|
Packages included all the GHC Boot Packages.
|
|
of GHC, not the version number of the package.)
|
|
|
|
|
|
Every GHC installation must include packages: `base` and
|
|
|
|
`template-haskell`, else GHC itself will not work. (In fact
|
|
Still, for convenience we'd probably arrange that the GHC Install
|
|
`haskell98` is also required, but only because it is linked by
|
|
Packages included all the GHC Boot Packages.
|
|
default.)
|
|
|
|
|
|
|
|
So GHC's Install Packages would be the Core Packages plus
|
|
Every GHC installation must include packages: `base` and
|
|
* `template-haskell`
|
|
`template-haskell`, else GHC itself will not work. (In fact
|
|
* `stm`
|
|
`haskell98` is also required, but only because it is linked by
|
|
* `readline`
|
|
default.)
|
|
|
|
|
|
You can upgrade any package, including `base` after installing GHC.
|
|
|
|
However, you need to take care. You must not change a number of things
|
|
So GHC's Install Packages would be the Core Packages plus
|
|
that GHC "knows about". In particular, these things must not change
|
|
|
|
* Name
|
|
- `template-haskell`
|
|
* Defining module
|
|
- `stm`
|
|
GHC knows even more about some things, where you must not change
|
|
- `readline`
|
|
* Type signature
|
|
|
|
* For data types, the names, types, and order of the constructors
|
|
|
|
The latter group are confined to packages base and template-haskell.
|
|
You can upgrade any package, including `base` after installing GHC.
|
|
|
|
However, you need to take care. You must not change a number of things
|
|
(Note: a few other packages are used by tests in GHC's test suite,
|
|
that GHC "knows about". In particular, these things must not change
|
|
currently: `mtl`, `QuickCheck`. We should probably eliminate the mtl
|
|
|
|
dependency; but `QuickCheck` is used as part of the test infrastructure
|
|
- Name
|
|
itself, so we'll make it a GHC Boot Package.)
|
|
- Defining module
|
|
|
|
|
|
=== Notes about Hugs ===
|
|
|
|
|
|
GHC knows even more about some things, where you must not change
|
|
Recent distributions of Hugs come in two sizes, jumbo and minimal.
|
|
|
|
Minimal distributions include only the packages `base`, `haskell98` and `Cabal`.
|
|
- Type signature
|
|
(Hugs includes another package `hugsbase` containing interfaces to Hugs primitives.)
|
|
- For data types, the names, types, and order of the constructors
|
|
The requirements for this set are to
|
|
|
|
* run Haskell 98 programs
|
|
|
|
* allow packages to be added and upgraded using Cabal
|
|
The latter group are confined to packages base and template-haskell.
|
|
(Currently `cpphs` is a Haskell 98 program, so the latter implies the former.)
|
|
|
|
|
|
|
|
It should be possible to upgrade even the core packages using Cabal.
|
|
(Note: a few other packages are used by tests in GHC's test suite,
|
|
|
|
currently: `mtl`, `QuickCheck`. We should probably eliminate the mtl
|
|
``` |
|
dependency; but `QuickCheck` is used as part of the test infrastructure
|
|
|
|
itself, so we'll make it a GHC Boot Package.)
|
|
|
|
|
|
|
|
### Notes about Hugs
|
|
|
|
|
|
|
|
|
|
|
|
Recent distributions of Hugs come in two sizes, jumbo and minimal.
|
|
|
|
Minimal distributions include only the packages `base`, `haskell98` and `Cabal`.
|
|
|
|
(Hugs includes another package `hugsbase` containing interfaces to Hugs primitives.)
|
|
|
|
The requirements for this set are to
|
|
|
|
|
|
|
|
- run Haskell 98 programs
|
|
|
|
- allow packages to be added and upgraded using Cabal
|
|
|
|
|
|
|
|
|
|
|
|
(Currently `cpphs` is a Haskell 98 program, so the latter implies the former.)
|
|
|
|
|
|
|
|
|
|
|
|
It should be possible to upgrade even the core packages using Cabal. |