
Here's a example of Dlist in base: https://github.com/ghc/ghc/blob/master/libraries/base/GHC/Event/PSQ.hs#L468
And here is in GHC module: https://github.com/ghc/ghc/blob/ba597c1dd1daf9643b72dc7aeace8d6b3fce84eb/uti...
It's so simple that people often define it with the code it's used, adding it to base can save these key stokes.
------------------ 原始邮件 ------------------
发件人: "Ivan Lazar Miljenovic";
Currently GHC already defined DList for internal use in serveral places. This data type is a nature choice when you need CPS your append, which is a common need. I think base should provide it.
It depends if GHC defines DList for use with base or not; if it's something that's required to use base that _may_ be a semi-valid use case. In general though, as annoying as it is to have to add yet another dependency, build, reload ghci, etc. I prefer to have base to be smaller and packages split up and the dlist package serves admirably. If nothing else, it can iterate faster if a new function needs to be added. Call this a weak +0.1(only because of GHC defining it). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com