Remove Text.Printf and System.Console.GetOpt from base
This was touched on in brief in a recent mailing list thread found at https://mail.haskell.org/pipermail/libraries/2018-October/029012.html. I propose removing Text.Printf
and System.Console.GetOpt
from base
and moving them into their own packages named printf
and getopt
that would be managed by the haskell github organization. These two libraries, when built against newer versions of base, would provide the modules. When built against old versions of base, they would simply reexport the modules. There would be breakage from doing this, but libraries and applications that use these APIs would only need to add a single line to build-depends
to continue being compatible with all versions of base
.
The benefits of doing this are small. As a matter of principle, it seems unfair that these two APIs are blessed by being a part of base when the would likely struggle to compete if they were in ordinary libraries. In particular, printf
is less idiomatic and performs worse that the functions from Numeric
(like showFFloat
), but its prominent position in base
encourages users to overlook the more type-safe options available for formatting numbers.
More practically, the size of base does occassionally cause problems. In https://github.com/haskell/primitive/issues/218#issuecomment-443534850, Carter writes
base getting bigger actually hurts folk, eg, base recently got big enough that dwarf data gnerated by ghc at -g1 is now sooo much that you can't do a dwarf annotated build of base on mac OS X! anymore
Moving these APIs out of base
makes a small step toward addressing this problem.
Trac metadata
Trac field | Value |
---|---|
Version | 8.6.2 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |