Re: GHCI/FFI/GMP/Me madness

2004-08-09 Thread Remi Turk
On Mon, Aug 09, 2004 at 01:09:40PM -0400, Abraham Egnor wrote: FWIW, I couldn't reproduce this problem on my system (i.e. str_test always printed 1). GHC 6.2.1, libgmp 4.1.3, debian unstable Abe Same versions here, on an old heavily-patched/FUBAR rock linux 1.4 system. Does the following

Re: [Haskell-cafe] Sets and Monads and comprehensions

2004-07-21 Thread Remi Turk
On Tue, Jul 20, 2004 at 04:42:24PM +0100, Graham Klyne wrote: I found myself treading a path which led me to asking the same question as [1]. Given the answer [2], I'd like to stand back a little and ask if there's another way to tackle my niggle: what I'm interested in is a set

Trivial to make PArr panic

2004-07-14 Thread Remi Turk
Hi, not directly a bug-report, but kind of a meta-bug-question: Is anyone interested in bug-reports about PArr, or is it a case of completely broken, go fix it yourself? I do not need it, but was playing around with it and found that both CVS and 6.2.1 panic even on something as simple as [: 1 |

Re: [Haskell-cafe] In relation to shuffling

2004-07-12 Thread Remi Turk
On Thu, Jul 08, 2004 at 11:44:38PM +0100, Alastair Reid wrote: [snip] We can do better though. Using two functions in System.Random, it's easy to get an infinite list of random numbers: randomRsIO :: IO [Int] randomRsIO = do g - getStdGen return (randoms g) [snip] Except

Re: [Haskell] Do the libraries define S' ?

2004-07-08 Thread Remi Turk
On Thu, Jul 08, 2004 at 03:47:08PM +1000, Bernard James POPE wrote: I use almost exactly the same thing in my code. And I nearly came up with the same names as you! (I have .. and .||.) I find them very useful in guards: foo x y | (this .. that) x = ... I don't believe this

Re: [Haskell] sizeFM type

2004-04-26 Thread Remi Turk
On Mon, Apr 26, 2004 at 08:58:53PM +0200, Wolfgang Jeltsch wrote: Am Montag, 26. April 2004 20:45 schrieb Don Groves: Some languages handle the Int/Integer question automatically, determined by the size of the integer in question. Int is used until the integer excedes what the underlying

Re: ghc, FFI and autotools

2003-11-21 Thread Remi Turk
On Fri, Nov 21, 2003 at 10:49:43PM +1100, Lloyd Allison wrote: We are trying to build and call some Haskell code in and from from the open-src spreadsheet gn'meric. It seems that it could be a good basis for experiments in FP + SSs. Hi, I'm afraid I don't have anything helpful to say, as even

Re: More type design questions

2003-08-18 Thread Remi Turk
On Mon, Aug 18, 2003 at 07:33:47PM +0200, Konrad Hinsen wrote: Well, yes, because my original example was cut down to illustrate the problem I had. The full version of the class Vect is class Vect v a where (+) :: Floating a = v a - v a - v a (-) :: Floating a = v a - v a - v a (*)

Re: Case expressions, matching, and constants

2003-07-18 Thread Remi Turk
On Thu, Jul 17, 2003 at 12:03:19PM +0100, Bayley, Alistair wrote: This is what I've turned it into to get it to work. It seems a bit clumsy; is there a better way to write this? test n = case True of _ | n == one - one | n == two - two |

Re: Lazy streams and unsafeInterleaveIO

2002-12-24 Thread Remi Turk
On Mon, Dec 23, 2002 at 09:05:00AM +, Glynn Clements wrote: Jyrinx wrote: So is this lazy-stream-via-unsafeInterleaveIO not so nasty, then, so long as a few precautions (not reading too far into the stream, accounting for buffering, etc.) are taken? I like the idiom Hudak uses

Re: Lazy streams and unsafeInterleaveIO

2002-12-22 Thread Remi Turk
On Sun, Dec 22, 2002 at 04:00:45AM -0800, Jyrinx wrote: As an experiment for a bigger project, I cooked up a simple program: It asks for integers interactively, and after each input, it spits out the running total. The wrinkle is that the function for calculating the total should be a

Re: how to debug?

2002-10-06 Thread Remi Turk
On Sun, Oct 06, 2002 at 07:57:18PM +, Zdenek Dvorak wrote: Hello, How does one debug in haskell? I have a function that I could swear should behave differently than it does, and after tracking down bugs for many hours, I'm wondering if there's any way to step through the evaluation of a

<    1   2