Re: [Haskell-cafe] ghc 6.4 import problem

2005-05-31 Thread Daniel Fischer
Am Dienstag, 31. Mai 2005 14:05 schrieben Sie: On Tue, 31 May 2005, Daniel Fischer wrote: (snip) The module Set has undergone major changes - look at the code and admire, if you have it. Formerly sets were implemented as 'FiniteMap's, now as size-balanced trees. Formerly there was a

Re: [Haskell-cafe] ghc 6.4 import problem (Map vs. FiniteMap)

2005-05-31 Thread Christian Maeder
Daniel Fischer wrote: Indeed, I have looked at the sources and found out that now the implementations of 'Set' and 'Map' are basically the same. The major achievement of (the new) Data.Set and Data.Map are canonical names that should be used in conjunction with qualified imports: import

Re: [Haskell-cafe] APIs (was: Unexported functions are evil)

2005-05-31 Thread Graham Klyne
At 17:20 19/05/05 -0400, [EMAIL PROTECTED] wrote: One of the best bad example is the use of boolean as arguments. Oh, yes. That's a pet peeve of mine. About 99% of boolean arguments should be meaningful two-valued enumerated types. It's literally a one-liner to create such an enumerated

Re: [Haskell-cafe] ghc 6.4 import problem

2005-05-31 Thread Fergus Henderson
On 31-May-2005, Daniel Fischer [EMAIL PROTECTED] wrote: Am Freitag, 27. Mai 2005 02:06 schrieb Shiqi Cao: I tried to port some code from ghc 6.2 to ghc 6.4, but I got the following error PrelExts.lhs:41:25: Ambiguous occurrence `map' It could refer to either `GHC.Base.map',

Re: [Haskell-cafe] Simulating OO programming with type classes; writing a factory fu nction

2005-05-31 Thread Bruno Oliveira
Hi Alistair! Just a quick reply (I didn't had time to look at Ralf's technique). Looking at your code, it seems to me that you are missing the notion of a supertype (perhaps, that's the intended thing with BaseClass?). I would use an existencial type to capture this notion: === data