[Haskell-cafe] Re: Haskell example archive?

2005-04-25 Thread Peter Eriksen
Echo Nolan [EMAIL PROTECTED] writes: Hello all, I recently read the post about a problem using the list monad, and I was wondering if there was an archive of monad usecases. If there is one, I'd like to see it, and if not it'd be a helpful part of the haskell community. Something like

Re: [Haskell-cafe] Why doesn't this work?

2005-04-25 Thread Daniel Fischer
Am Montag, 25. April 2005 08:16 schrieb Michael Vanier: I've been trying to generate an infinite list of random coin flips in GHC 6.4, and I've come across some strange behavior: -- import System.Random data Coin = H | T

Re: [Haskell-cafe] Why doesn't this work?

2005-04-25 Thread Duncan Coutts
On Sun, 2005-04-24 at 23:16 -0700, Michael Vanier wrote: I've been trying to generate an infinite list of random coin flips in GHC 6.4, and I've come across some strange behavior: -- import System.Random data Coin = H | T

[Haskell-cafe] String search algorithms

2005-04-25 Thread Bayley, Alistair
I'm a bit puzzled to find no sub-string search in the Haskell libraries (unless there's some neat composition of the existing Data.List functions that I've missed). Google doesn't help much either. I've found a KMP implementation: http://haskell.org/hawiki/RunTimeCompilation I'm after something

Re: [Haskell-cafe] String search algorithms

2005-04-25 Thread Henning Thielemann
On Mon, 25 Apr 2005, Bayley, Alistair wrote: I'm a bit puzzled to find no sub-string search in the Haskell libraries (unless there's some neat composition of the existing Data.List functions that I've missed). Google doesn't help much either. I've found a KMP implementation:

RE: [Haskell-cafe] String search algorithms

2005-04-25 Thread Bayley, Alistair
From: Henning Thielemann [mailto:[EMAIL PROTECTED] (unless there's some neat composition of the existing Data.List functions List.findIndex (List.isPrefixOf bla) (List.tails dfvbdbblaesre) Oh, so there is. Thanks. -

Re: [Haskell-cafe] String search algorithms

2005-04-25 Thread Henning Thielemann
On Mon, 25 Apr 2005, Henning Thielemann wrote: On Mon, 25 Apr 2005, Bayley, Alistair wrote: I'm a bit puzzled to find no sub-string search in the Haskell libraries (unless there's some neat composition of the existing Data.List functions that I've missed). Google doesn't help much either. I've

RE: [Haskell-cafe] String search algorithms

2005-04-25 Thread Bayley, Alistair
From: Henning Thielemann [mailto:[EMAIL PROTECTED] But I'm curious if you really need the index. Working with indexes on lists is quite inefficient. E.g. if you want to replace substrings you may want to use this implementation: I'm not mutating the list, but I am extracting sublists.

RE: [Haskell-cafe] FFI and pointers to pointers

2005-04-25 Thread Simon Marlow
On 22 April 2005 16:18, Dimitry Golubovsky wrote: I am trying to generalize my knowledge about FFI declarations when dealing with pointers to pointers (import from C to Haskell). Maybe these are silly questions, but It seems to me, I am missing some understanding. Per the FFI Addendum:

RE: [Haskell-cafe] FFI and pointers to pointers

2005-04-25 Thread Simon Marlow
On 25 April 2005 12:51, Simon Marlow wrote: On 22 April 2005 16:18, Dimitry Golubovsky wrote: I am trying to generalize my knowledge about FFI declarations when dealing with pointers to pointers (import from C to Haskell). Maybe these are silly questions, but It seems to me, I am missing

[Haskell-cafe] How to debug GHC

2005-04-25 Thread Monique Louise de Barros Monteiro
Hi, all, I'm developing a back end for GHC and I have the following problem: my program is throwing an empty list exception due to head [] and I need to compile GHC with -prof -auto-all in order to see the stack trace when running it with +RTS -xc -RTS. I changed the makefile but the option +RTS