If you arrange the types to try to do all the operations inside the IO
monad you can't chain together more than 1 binary operation. eg.
do
S - A + B
Z - Q * S
vs
do
S - Q * (A + B)
Are there any suggestions for this dilemma? Am I using the wrong monad for
this task?
Dominic Steinitz wrote:
If you arrange the types to try to do all the operations inside the IO
monad you can't chain together more than 1 binary operation. eg.
do
S - A + B
Z - Q * S
vs
do
S - Q * (A + B)
Are there any suggestions for this dilemma? Am I using
David Roundy wrote:
I long
for a Data.Map.Strict, for instance, because it's so hard to use Data.Map
without producing memory leaks...
It's at times like this that I really wonder why on earth I bother
working hard on libs for the benefit of the community. But I guess
I'm not alone in that.
SevenThunders wrote:
OK so check out what really happens with liftM2. Suppose I have an IO
containing an involved matrix computation called s. For simplicity
we might
assume that
s :: IO (Int)
and the Int is an index into an array containing a bunch of matrices in C
land. Assume
SevenThunders wrote:
Ryan Ingram wrote:
As long as the FFI calls don't make destructive updates to existing
matrices, you can do what you want.
For example, assuming you have:
-- adds the second matrix to the first overwrites the first
matrixAddIO :: MatrixIO - MatrixIO - IO ()
-- creates a
SevenThunders wrote:
Unfortunately if I wrap my matrix references in the IO monad, then at best
computations like
S = A + B are themselves IO computations and thus whenever they are
'invoked' the computation ends up getting performed repeatedly contrary to
my intentions.
This sounds like a
On Tuesday 11 September 2007 09:17, Don Stewart wrote:
Just in case people didn't see, the `binary' package lives on
http://darcs.haskell.org/binary/
However, Lennart Kolmodin, Duncan and I are actively maintaining and
reviewing patches, so send them to one (or all) of us for review.
Hi,
today while mowing the lawn, I thought how to statically prevent some
problems with infinte lists. I was wondering if it is possible to
somehow mark a list as one of finite/infinite/unknown and to mark
list-processing functions as whether they can handle infinte lists.
For example, it is
On Sat, Sep 15, 2007 at 01:20:57PM +0200, Sven Panne wrote:
On Tuesday 11 September 2007 09:17, Don Stewart wrote:
Just in case people didn't see, the `binary' package lives on
http://darcs.haskell.org/binary/
However, Lennart Kolmodin, Duncan and I are actively maintaining and
On Saturday 15 September 2007 20:09, Stefan O'Rear wrote:
packages is only for those libraries that are shipped with GHC.
First of all, this fact would be new to me, furthermore this would be a highly
volatile categorization. Should URLs change when a package suddenly gets into
or was thrown
On 9/15/07, Joachim Breitner [EMAIL PROTECTED] wrote:
today while mowing the lawn, I thought how to statically prevent some
problems with infinte lists. I was wondering if it is possible to
somehow mark a list as one of finite/infinite/unknown and to mark
list-processing functions as whether
[replying to haskell-cafe]
On 9/15/07, Norman Ramsey [EMAIL PROTECTED] wrote:
Dear Haskellers,
I've had a Haskell program rejected for reasons I don't understand.
Here's the relevant bit of code; the problem is that I expected the
type-inference engine to generalize the abbreviation 'fold'
Hi
Monomorphism restriction? Replacing fold with foldRegsUsed would work
because there's a type signature for foldRegsUsed.
That looks like it. Another solution would be:
fold = foldRegsUsed
becomes:
fold x = foldRegsUsed x
Now the monomorphism restriction doesn't kick in because fold
Prelude let inf = repeat 1
Prelude inf
[1,1,(lots of output until I press ctrl-c),Interrupted.
(I expect this to happen)
Prelude let x = inf
(no output here!)
Prelude :t x
x :: [Integer]
Prelude return inf
[1,1,(lots of output until I press ctrl-c),Interrupted.
(I also expect this to happen)
On Sat, Sep 15, 2007 at 08:35:02PM -0700, Ryan Ingram wrote:
Prelude let inf = repeat 1
Prelude inf
[1,1,(lots of output until I press ctrl-c),Interrupted.
(I expect this to happen)
Prelude let x = inf
(no output here!)
Prelude :t x
x :: [Integer]
Prelude return inf
[1,1,(lots of output
Ryan Ingram wrote:
Prelude let inf = repeat 1
Prelude inf
[1,1,(lots of output until I press ctrl-c),Interrupted.
(I expect this to happen)
Prelude let x = inf
(no output here!)
Prelude :t x
x :: [Integer]
Prelude return inf
[1,1,(lots of output until I press ctrl-c),Interrupted.
(I also expect
I've built a program with the -threaded option using ghc. This option is
supposed to link your program to the threaded runtime with support for
multicore CPUS (mine is a dual core). The program pukes with the message in
the subject line when I try to use the -N option to tell it to use both
On Sat, Sep 15, 2007 at 09:49:56PM -0700, Gregory Propf wrote:
I've built a program with the -threaded option using ghc. This option is
supposed to link your program to the threaded runtime with support for
multicore CPUS (mine is a dual core). The program pukes with the message in
the
18 matches
Mail list logo