Data.Sequence?

Ross Paterson ross at soi.city.ac.uk
Wed May 31 13:28:20 EDT 2006


On Wed, May 31, 2006 at 12:20:02PM +0200, Michael Marte wrote:
> when importing Data.Queue in 6.4.2, I am told that it is deprecated and 
> that I should use Data.Sequence instead. However, Data.Sequence is not 
> part of the base package - it is there but it is missing from the 
> package.conf file.

Data.Queue ought not to be deprecated in 6.4, as Data.Sequence won't
be available until the next major release.

> Moreover, there is no documentation available apart 
> from the source code itself.

http://www.haskell.org/ghc/dist/current/docs/libraries/base/Data-Sequence.html

> Regarding Data.Sequence itself:
> - I am missing a function for converting a sequence to a list directly; 
> I have to create a view and convert it to a list.

Data.Foldable has toList and various folds, for a class that includes Seq.

> - Isn't the name too fuzzy? After all, a standard Haskell list is a 
> sequence as well. Why not stay with Queue?

The name is fairly well-established for the data type provided there;
it's much more than a queue.



More information about the Glasgow-haskell-users mailing list