
On Wed, Oct 20, 2010 at 10:19 PM, Bas van Dijk
Hello,
I would like to make three proposals, in order of importance IMHO:
1. Export String from Data.String. Most modules in base and on Hackage of the form: Data.<type> also export <type>. I think it's surprising and confusing that Data.String doesn't conform to this pattern.
2. Unexport String from Data.Char. I feel less strongly about this one, but in general I think it is good that a symbol is exported from as few modules as possible.
3. Export the String operations: lines, words, unlines and unwords from Data.String. I feel even less strongly about this one. However these are operations on Strings so it makes sense to export them from Data.String. As a counter argument you could say these operations either receive or produce a _list_ of Strings so they only belong in Data.List.
If we accept 3 then in the spirit of "export a symbol from as few modules as possible", you may expect a fourth proposal: Unexport the String operations: lines, words, unlines and unwords from Data.List. However I think this will break lots of programs. I have no problem also discussing this one though.
Discussion deadline:
3 weeks from now: Wednesday 10 November.
Ticket with patches:
http://hackage.haskell.org/trac/ghc/ticket/4422
Regards,
Bas
The deadline of this proposal has passed. However, due to the recent activity on the libraries list, I would like to extend the deadline by a week: Thursday 18 November. Regarding proposal 2: Unexport String from Data.Char, I made a quick analysis of the latest versions of all packages on Hackage which import String from Data.Char: $ find . -type f -print0 | xargs -0 -e grep -l -e "import.*Data\.Char.*String" ./usb-id-database-0.4.0.4/System/USB/IDDB/Base.hs ./usb-id-database-0.4.0.4/System/USB/IDDB/UsbDotOrg.hs ./usb-id-database-0.4.0.4/System/USB/IDDB/LinuxUsbIdRepo.hs ./usb-id-database-0.4.0.4/System/USB/IDDB/Misc.hs ./ftdi-0.2.0.1/test.hs ./usb-safe-0.11/System/USB/Safe.hs ./safer-file-handles-0.9/System/IO/SaferFileHandles.hs ./ls-usb-0.1.0.7/PrettyDevList.hs ./dstring-0.4/Data/DString.hs ./regional-pointers-0.5/Foreign/C/String/Region.hs ./usb-0.6.0.4/System/USB/Internal.hs ./concurrent-extra-0.6/Control/Concurrent/ReadWriteLock.hs ./concurrent-extra-0.6/TestUtils.hs ./explicit-iomodes-0.6/System/IO/ExplicitIOModes.hs ./hamusic-0.1.2.1/src/Music/Analysis/Abstract2Lilypond.lhs ./hamusic-0.1.2.1/src/Music/Analysis/Base.lhs ./hamusic-0.1.2.1/src/Music/Analysis/Interface.lhs ./musicxml-0.1.2/src/Text/XML/MusicXML/Direction.lhs ./musicxml-0.1.2/src/Text/XML/MusicXML/Common.lhs ./musicxml-0.1.2/src/Text/XML/MusicXML/Note.lhs ./roman-numerals-0.4.0.1/Text/Numeral/Roman.hs All these packages are maintained by either me or my brother, except for hamusic and musicxml which are maintained by Samuel Silva. Regards, Bas