
Hello *, 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. Moreover, there is no documentation available apart from the source code itself. 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. - Isn't the name too fuzzy? After all, a standard Haskell list is a sequence as well. Why not stay with Queue? Michael

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.ht...
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.

Ross Paterson wrote:
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.ht...
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.
Hi - I'm thinking of using a finger tree to represent text of an edit buffer. I've downloaded FingerTree.hs but I see it uses the following modules which I don't seem to have on my system (ghc 6.4.2) : Control.Applicative Data.Foldable Data.Traversable Is there somewhere I can download these modules from, and would they work with ghc 6.4.2, or should I use a later version of ghc? Also, I couldn't find a link anywhere to download Data.Sequence although I see that it can be created by instantiating FingerTree appropriately somehow... Thanks, Brian. -- Logic empowers us and Love gives us purpose. Yet still phantoms restless for eras long past, congealed in the present in unthought forms, strive mightily unseen to destroy us. http://www.metamilk.com

Ross Paterson wrote:
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.
Michael, there appears to be something strange about your GHC installation. In 6.4.2, Data.Queue is not deprecated, and the Data.Sequence library is not present at all. Cheers, Simon

Simon, Simon Marlow wrote:
Ross Paterson wrote:
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.
Michael, there appears to be something strange about your GHC installation. In 6.4.2, Data.Queue is not deprecated, and the Data.Sequence library is not present at all.
I installed ghc-6-4-2.msi on Windows. The same behaviour is exposed by ghc 6.4.1 on Debian Linux. The deprecation took place on July 29th last year as is clearly visible from the CVS log, see below. Data.Sequence is in the CVS repository and there is a file Sequence.hi in hslibs-imports/data in my installation. Michael http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Data/Queue.... Revision 1.5: download - view: text, markup, annotated - select for diffs Fri Jul 29 17:17:22 2005 UTC (10 months ago) by ross Branches: MAIN CVS tags: cmm-merge2, HEAD Diff to previous 1.4: preferred, colored Changes since revision 1.4: +4 -0 lines document deprecation ----------------------------------------------------------------------------- -- | -- Module : Data.Queue -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Portability : portable -- -- NOTE: This module is DEPRECATED. -- The data structure in "Data.Sequence" is a faster queue and also -- supports a wider variety of operations. -- -- Queues with constant time operations, from -- /Simple and efficient purely functional queues and deques/, -- by Chris Okasaki, /JFP/ 5(4):583-592, October 1995. -- ----------------------------------------------------------------------------- module Data.Queue {-# DEPRECATED "Use Data.Sequence instead: it's faster and has more operations" #-}

Hello Michael, Thursday, June 1, 2006, 5:26:33 PM, you wrote:
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Data/Queue....
Revision 1.5: download - view: text, markup, annotated - select for diffs Fri Jul 29 17:17:22 2005 UTC (10 months ago) by ross Branches: MAIN CVS tags: cmm-merge2, HEAD
it's a HEAD, i.e. ghc 6.5 version. i have installed 6.4.2 sources (which should be marked STABLE in repository) and they don't mark any deprecation: ----------------------------------------------------------------------------- -- | -- Module : Data.Queue -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stability : experimental -- Portability : portable -- -- Queues with constant time operations, from -- /Simple and efficient purely functional queues and deques/, -- by Chris Okasaki, /JFP/ 5(4):583-592, October 1995. -- ----------------------------------------------------------------------------- module Data.Queue( Queue, -- * Primitive operations -- | Each of these requires /O(1)/ time in the worst case. emptyQueue, addToQueue, deQueue, -- * Queues and lists listToQueue, queueToList ) where import Prelude -- necessary to get dependencies right import Data.Typeable ..... -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Michael Marte wrote:
I installed ghc-6-4-2.msi on Windows. The same behaviour is exposed by ghc 6.4.1 on Debian Linux.
Not here! Can you tell me *exactly* how you encounter the problem?
The deprecation took place on July 29th last year as is clearly visible from the CVS log, see below.
You're looking at the HEAD, the 6.4 releases are taken from the ghc-6-4-branch. Our latest sources are in a darcs repository.
Data.Sequence is in the CVS repository
again, in HEAD only, not 6.4 branch
and there is a file Sequence.hi in hslibs-imports/data in my installation.
That Sequence module is part of Edison, in the (old) package data. Also, it is called "Sequence", as opposed to "Data.Sequence", which is in 6.5. Cheers, Simon

Simon, I am sorry, I mixed things up. Everything works fine. To find the source for Data.Sequence, I looked up the CVS repository and, I guess, there I saw that Data.Queue is deprecated on the HEAD. My underlying assumption obviously was that CVS was replaced by Darcs before starting development for 6.5. Michael Simon Marlow wrote:
Michael Marte wrote:
I installed ghc-6-4-2.msi on Windows. The same behaviour is exposed by ghc 6.4.1 on Debian Linux.
Not here! Can you tell me *exactly* how you encounter the problem?
The deprecation took place on July 29th last year as is clearly visible from the CVS log, see below.
You're looking at the HEAD, the 6.4 releases are taken from the ghc-6-4-branch. Our latest sources are in a darcs repository.
Data.Sequence is in the CVS repository
again, in HEAD only, not 6.4 branch
and there is a file Sequence.hi in hslibs-imports/data in my installation.
That Sequence module is part of Edison, in the (old) package data. Also, it is called "Sequence", as opposed to "Data.Sequence", which is in 6.5.
Cheers, Simon

Michael Marte wrote:
I am sorry, I mixed things up. Everything works fine. To find the source for Data.Sequence, I looked up the CVS repository and, I guess, there I saw that Data.Queue is deprecated on the HEAD. My underlying assumption obviously was that CVS was replaced by Darcs before starting development for 6.5.
Ok, no problem, glad that's cleared up. Cheers, Simon
participants (5)
-
Brian Hulley
-
Bulat Ziganshin
-
Michael Marte
-
Ross Paterson
-
Simon Marlow