Re: [Haskell-cafe] [Newbie] Quest for inheritance

2005-06-08 Thread Cédric Paternotte
On 6/6/05, Gracjan Polak <[EMAIL PROTECTED]> wrote: > If you stick to single inheritance there is other way to simulate OO in > Haskell. Look for "phantom types". Whole wxHaskell (for example) is > based on this concept. I heard about them indeed but barely found clear explanations of it. Any usef

Re: [Haskell-cafe] OT: http://www.cse.unsw.edu.au host name does not resolve

2005-06-08 Thread Cale Gibbard
Seems up to me. The name also resolves. You might try a different nameserver. $ host www.cse.unsw.edu.au www.cse.unsw.edu.au CNAME albeniz.orchestra.cse.unsw.edu.au albeniz.orchestra.cse.unsw.edu.au A 129.94.242.51 ___ Haskell-Cafe mail

[Haskell-cafe] OT: http://www.cse.unsw.edu.au host name does not resolve

2005-06-08 Thread Dimitry Golubovsky
Sorry for this OT, but the server seems to be unaccessible. And so is the Haskell-related stuff on it (like the FFI Addendum). The requested URL could not be retrieved Here's what the proxy says: (possibly a DNS problem) --

[Haskell-cafe] Priority Queues from Rabhi & Lapalme's Algorithms was Re: class Ref...

2005-06-08 Thread Shae Matijs Erisson
Gracjan Polak <[EMAIL PROTECTED]> writes: > To put it another way: is Data.Map only workaround to get something done, or > is it The Right Way of doing PQs in Haskell? Another option is the priority queues from the Rabhi & Lapalme book: http://www.iro.umontreal.ca/~lapalme/Algorithms-functional.h

Re: [Haskell-cafe] Space questions about intern and sets

2005-06-08 Thread Udo Stenzel
Gracjan Polak wrote: > >>iorefset :: Ord a => IORef(Map.Map a a) > >>iorefset = unsafePerformIO $ do > >> newIORef $ Map.empty > > I could have as many dictionaries as there are types. The problem is I > get one dictionary for each object which defeats the idea. I believe the (Ord a) constra

[Haskell-cafe] Priority queues (was re: refs)

2005-06-08 Thread Jan-Willem Maessen
On Jun 8, 2005, at 7:13 AM, Gracjan Polak wrote: Tomasz Zielonka wrote: [Data.Map can be used to implement priority queues] Wow, I did not think about this. As far as I remember in imperative world priority queues had special implementation, with very good O() characteristics. Is O(log N)

Re: [Haskell-cafe] Space questions about intern and sets

2005-06-08 Thread Gracjan Polak
Bjorn Bringert wrote: memory. Here is something I wrote, but it doesn't work :( I must have been doing something really wrong that day, because today it works smoothly... :) The code below seems to work for strings, and should be generalizable to any type for which you have a hash funct

Re: [Haskell-cafe] class Ref...

2005-06-08 Thread Colin DeVilbiss
On 6/8/05, Gracjan Polak <[EMAIL PROTECTED]> wrote: > Tomasz Zielonka wrote: > > On Tue, Jun 07, 2005 at 12:25:50PM +0200, Gracjan Polak wrote: > > > To put it another way: is Data.Map only workaround to get something > done, or is it The Right Way of doing PQs in Haskell? Another option is to loo

Re: [Haskell-cafe] Space questions about intern and sets

2005-06-08 Thread Bjorn Bringert
Gracjan Polak wrote: Hello all, I've got two questions, both are space related so I'll put them in one e-mail. 1. I'd like to have function intern, that behaves essentially like id, but with the following constraint: if x==y then makeStableName(intern x)==makeStableName(intern y) Reason

Re: [Haskell-cafe] class Ref...

2005-06-08 Thread Gracjan Polak
Tomasz Zielonka wrote: On Tue, Jun 07, 2005 at 12:25:50PM +0200, Gracjan Polak wrote: Another question: priority queue. In libraries bundled with ghc we have Data.Queue, but I couldn't find PriorityQueue. Is there somewhere an implementation that everybody uses, but is not in the library? Y