Udo Stenzel wrote:
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)
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)
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
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) constraint acts
Duncan Coutts wrote:
On Fri, 2005-06-03 at 10:53 +0200, Gracjan Polak wrote:
As intern behaves like id and does not have any side effects, I thought
its interface should be purely functional. But I do not see any way to
do it :( I'll end up with a monad, probably.
In related question: does
Scott Turner wrote:
On 2005 June 02 Thursday 04:38, 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
On Fri, 2005-06-03 at 10:53 +0200, Gracjan Polak wrote:
As intern behaves like id and does not have any side effects, I thought
its interface should be purely functional. But I do not see any way to
do it :( I'll end up with a monad, probably.
In related question: does anybody here have
On Fri, 3 Jun 2005, Gracjan Polak wrote:
...
In related question: does anybody here have experience/benchmarks/tests
how/if is PackedString better (uses less memory) than String in parsing
tasks?
I don't have that information, but in case it helps, look out
for splitPS - it makes the fairly
On Fri, Jun 03, 2005 at 04:02:09PM +0100, Duncan Coutts wrote:
On Fri, 2005-06-03 at 10:53 +0200, Gracjan Polak wrote:
As intern behaves like id and does not have any side effects, I thought
its interface should be purely functional. But I do not see any way to
do it :( I'll end up with a
Marcin 'Qrczak' Kowalczyk wrote:
Gracjan Polak [EMAIL PROTECTED] writes:
intern :: Ord a = a - a
intern x = unsafePerformIO $ internIO x
iorefset :: Ord a = IORef(Map.Map a a)
iorefset = unsafePerformIO $ do
newIORef $ Map.empty
It will not work because you can't put values of
On 2005 June 02 Thursday 04:38, 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.
To avoid
Gracjan Polak [EMAIL PROTECTED] writes:
intern :: Ord a = a - a
intern x = unsafePerformIO $ internIO x
iorefset :: Ord a = IORef(Map.Map a a)
iorefset = unsafePerformIO $ do
newIORef $ Map.empty
It will not work because you can't put values of different types as
keys of the same
12 matches
Mail list logo