gcc -c BusErr.m
ghci -framework Foundation +RTS -RTS BusErr.o
Loading package base ... linking ... done.
Loading object (static) BusErr.o ... done
Loading object (framework) Foundation ... done
final link ... Bus error
Now that is interesting. I can reproduce that on my machine, and I'll
Bugs item #1035575, was opened at 2004-09-27 19:33
Message generated for change (Comment added) made by ekarttun
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=108032aid=1035575group_id=8032
Category: Compiler
Group: None
Status: Open
Resolution: None
Priority: 5
MR K P SCHUPKE wrote:
Thanks for the URL... I have realised I jumped the gun saying the derivation can be
done in template-haskell... there is one small problem:
$(derive [t| SomeConstructor a b |])
passes the constructor to derive... is there any way to get the type information
for some type?
Title: Mutable hash?
Does anybody know about a mutable hash implementation for ghc?
There is going to be a lot of updates in the hash (some millions adds and removes) so a non-mutable structure will not do?!
Cheers,
Petter
###This message has
There is a hashtable in the IO monad:
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.HashTable.html
I understand there was an important bugfix that went into 6.2.2 for this
hashtable implementation, so you'll probably want to make sure to use
the latest GHC if you'll be using
Thanks!
Petter
-Opprinnelig melding-
Fra: Robert Dockins [mailto:[EMAIL PROTECTED]
Sendt: 21. oktober 2004 15:17
Til: Petter Egesund
Kopi: [EMAIL PROTECTED]
Emne: Re: Mutable hash?
There is a hashtable in the IO monad:
On Wed, Oct 20, 2004 at 03:46:47PM +0100, Simon Marlow wrote:
I liked the original idea. I'm not sure if I agree with the argument
that allowing fully-fledged IO actions in the initialisation of a module
is unsafe. I agree that it is a little opaque, in the sense that one
can't easily tell
On Wed, Oct 20, 2004 at 04:38:54PM +0100, Simon Peyton-Jones wrote:
* When a program is started, the module initialisation actions of its
modules run, in an order that respects module dependencies.
What happens when there are cicular dependencies between modules. Perhaps
the circular
Simon,
I had answered to your e-mail almost two days ago, then I
resent my reply today, but apparently my e-mail doesn't
reach you! I see that it was delivered correctly here on my
machine:
Oct 21 18:56:51 peti sm-mta[11337]: i9LGunqM011335:
to=[EMAIL PROTECTED],[EMAIL PROTECTED],
G'day.
Quoting Petter Egesund [EMAIL PROTECTED]:
Does anybody know about a mutable hash implementation for ghc?
How about three of them?
http://cvs.sourceforge.net/viewcvs.py/haskell-libs/libs/hashtable/
They're all concurrency-safe.
Cheers,
Andrew Bromage
recently I was surprised by readList's behaviour (I'm no implying it is
wrong). Look at this:
data R = R deriving Show
instance Read R where
readsPrec p cs = do
( x, cs' ) - lex cs
case x of R - return (R, cs')
_ - error no R
that is, we have a very eager
Am 21.10.2004 um 09:55 schrieb Johannes Waldmann:
turns out that check1 and check2 work, but check0 will not (I thought
it would). The implementation (in the Prelude) seems to think that ]
(in check0) could possibly be the beginning of a list element.
This is just a problem of non-deterministic
Because of that, calling error in one of your read functions seems a bad
idea. In fact, returning an empty list is the right way to return an error
in the prelude's parsing framework. If you want something different (e.g.,
because you want better error messages) you should not be using the
[Apologies if you have received multiple
postings]
CALL FOR PAPERS
International Workshop
on Ubiquitous
Computing (IWUC
2005)May 24-25, 2005 - Miami, USA
In conjunction with the
Seventh International Conference on
Peter Simons wrote:
type Buffer = (Ptr Word8, Int)
data StreamProc ctx a
= SP
{ start :: IO ctx
, feed :: ctx - Buffer - IO ctx
, commit :: ctx - IO a
}
Must contexts be used in a single-threaded manner? If so, I would expect
this interface:
start :: IO ctx
This is the interface I came up with (and its fairly efficient):
data IList a i e = ICons i i (a i e) (IList a i e) | INil
class List l e where
nil :: l e
null :: l e - Bool
head :: l e - e
tail :: l e - l e
(+:) :: e - l e - l e
class List (l a i) e = ListPlus l a i e where
Ben Rudiak-Gould writes:
Must contexts be used in a single-threaded manner? If so,
I would expect this interface:
start :: IO ctx
feed :: ctx - Buffer - IO ()
commit :: ctx - IO a
'feed' cannot have this signature because it needs to update
the context.
If not, I
K P SCHUPKE writes:
This is the interface I came up with (and its fairly efficient):
data IList a i e = ICons i i (a i e) (IList a i e) | INil
Isn't that an interface for doing fast I/O rather than for
writing stream processors? If I look at the consumer:
wc :: List l Word8 = l Word8 -
Okay, maybe I misunderstood, I thought by stream
processors you meant functions of the type:
process :: [a] - [a]
where both the input and the output are lazy lists (streams)
I would assume if you want to have a stateful filter you need
to maintain the state by using either:
Peter Simons wrote:
Ben Rudiak-Gould writes:
Must contexts be used in a single-threaded manner? If so,
I would expect this interface:
start :: IO ctx
feed :: ctx - Buffer - IO ()
commit :: ctx - IO a
'feed' cannot have this signature because it needs to update
the
K P SCHUPKE writes:
Okay, maybe I misunderstood, I thought by stream
processors you meant functions of the type:
process :: [a] - [a]
No, my stream processors currently have the API I described
in my initial posting. What I was wondering is whether there
is a more general API that I
Ben Rudiak-Gould writes:
start :: IO ctx
feed :: ctx - Buffer - IO ()
commit :: ctx - IO a
'feed' cannot have this signature because it needs to
update the context.
Sure it can -- it's just like writeIORef :: IORef a - a - IO ().
I guess it's mood to argue that
K P SCHUPKE writes:
My point was... using the IO library I posted which
abstracts the buffer management, you can treat the IO as
a simple list...
Do you happen to have a ready-to-run word-counting example
for me which is based on your library? I've tried to compile
the code you posted, but
At 21 Oct 2004 16:48:57 +0200,
Peter Simons wrote:
Hi,
I know the stream processors as described in Hughes' paper
about Arrows, but those are pure stream processors -- they
don't allow for I/O, which I need to handle the Ptr.
Here is a some code I scraped off the net a while ago, though I
Jeremy Shaw writes:
Here is a some code I scraped off the net a while ago,
though I can't seem to find the origin anymore.
I _think_ it is from part of Fudgets library:
http://www.cs.chalmers.se/Cs/Research/Functional/Fudgets/
Thanks for posting it, though, this implementation is rather
On Sat, Oct 16, 2004 at 05:54:46AM +, [EMAIL PROTECTED] wrote:
data Bar a m = forall t. (MonadTrans t, Monad (t m)) =
Bar (t m a - m a) (t m Int)
data Foo = Foo (forall a m. Monad m = Bar a m)
Is it true that I cannot have a function
foo run op = Foo (Bar run op)
Ben Rudiak-Gould writes:
bar :: StreamProc ctx a - IO (a,a)
bar sp = do
ctx - start sp
(ptr1,n1) - ...
(ptr2,n2) - ...
ctx1 - feed sp ctx (ptr1,n1)
ctx2 - feed sp ctx (ptr2,n2)
val1 - commit sp ctx1
val2 - commit sp ctx2
return (val1,val2)
27 matches
Mail list logo