wiki:SplitBase

Version 5 (modified by nomeata, 14 months ago) (diff)

--

Splitting base

In a thread on glasglow-haskell-users in February some ideas about splitting base in smaller components were floating around. This wiki page tries to assemble ideas on how to re-group the modules.

The following is a list of all modules in Base, with a suggested re-grouping. Whether this makes sense WRT interdependencies has not yet been verified:

base-pure

One package for all standard ADTs (Bool, [], Maybe...) and other pure definitions that are expected to work even with strange targets.

Question: Do we want this to include Int and Integer? It is required for, e.g. length, but already includes assumptions about the target. But probably they’d need to go in here as well.

Question: Any reason to keep Char and String separate? Maybe the requirement on the unicode data? Presumably there are interesting targets that do not need String (embedded devices), but what about functions like error?

Answer: Probably not possible: The monad class needs String for fail, and also error for the default instance. Also there are classes (Exception) with Show class constraints.

But: GHC.Unicode uses the FFI...

What about Data and Typeable? Looks as if we can avoid them, but then Data.Int requires throw DivideByZero which in turn pulls in exceptions and hence Typeable

base-io

Everything related to IO as we know it.

base-ffi

Lots of packages surely do not need anything from the FFI, so put that in a package of its own.

Unsorted