RE: List.partition a bit too eager
It's a bug in the defn of 'partition' in the Haskell 98 report. I have (still) failed to publish this as an errata, let alone revise the report itself, so the buggy defn stands at present, I'm afraid. I really plan to get to the revision in early '01. Simon | -----Original Message----- | From: George Russell [mailto:ger@tzi.de] | Sent: 22 December 2000 15:57 | To: haskell@haskell.org | Subject: List.partition a bit too eager | | | I think the following program | | import List | main = putStr . show . fst . (partition id) . cycle $ [True,False] | | should display [True,True,True,...]. But instead, for both | GHC and Hugs, | you get a stack overflow. Is this a bug, or could someone | explain it to me? | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org | http://www.haskell.org/mailman/listinfo/haskell |
Simon Peyton-Jones wrote:
It's a bug in the defn of 'partition' in the Haskell 98 report. I have (still) failed to publish this as an errata, let alone revise the report itself, so the buggy defn stands at present, I'm afraid.
I really plan to get to the revision in early '01.
One thing I would like to see changed is that every function should also appear with a short description in English, as for the SML basis library. This would be a huge improvement for those of us whose mother-tongue is English and not Haskell, and would also mean that in cases such as these the implementors would have more liberty to choose the best interpretation consistent with the spirit of the standard. (Irrelevant comment: I believe something similar happens with European Union treaties, which are in a variety of versions in different languages from Irish Gaelic to Swedish, all of which are deemed to have equal weight. Translation errors are not unknown, and have to be sorted out by the European Court of Justice.)
participants (2)
-
George Russell -
Simon Peyton-Jones