[Haskell-cafe] Mutually recursive modules

2013-05-08 Thread Roman Cheplyaka
I wonder whether it's always possible to break cycles using GHC's .hs-boot files. Consider the following schematic example: module A where import B data A f :: B - A f = undefined B.g module B where import A data B g :: A - B g = undefined A.f A.hs-boot must give a

Re: [Haskell-cafe] Incrementation fails

2013-05-08 Thread Roel van Dijk
Hi John, Can you tell us what your function is supposed to do? It appears to be some kind of search-and-replace for strings. What is the relationship between 'findStr', 'replaceStrList' and 'myText'? 2013/5/8 John knowledge1...@gmail.com Hello All, I'm in a big trouble with incrementation

Re: [Haskell-cafe] Incrementation fails

2013-05-08 Thread Roel van Dijk
I stared at the code some more and deduced what I think is the intented meaning. Occurences of 'findStr' in 'myText' are replaced with the strings in 'replaceStrList'. So replaceBasedIdx X [b,d,f] aXcXeXg = abcdefg The reason your counter didn't increment is because it was defined as an argument

Re: [Haskell-cafe] Mutually recursive modules

2013-05-08 Thread Francesco Mazzoli
At Wed, 8 May 2013 09:46:08 +0300, Roman Cheplyaka wrote: I wonder whether it's always possible to break cycles using GHC's .hs-boot files. Consider the following schematic example: module A where import B data A f :: B - A f = undefined B.g module B where

Re: [Haskell-cafe] Incrementation fails

2013-05-08 Thread Roel van Dijk
problem = replaceBasedIdx X [b,d,f] aXcXeXgX -- abcdefg*** Exception: Prelude.(!!): index too large This problem occurs because you never check if 'counter' is a valid index in the 'replaceStrList'. You can solve it by not using the !! operator at all. The solution is to also pass

Re: [Haskell-cafe] Mutually recursive modules

2013-05-08 Thread Roman Cheplyaka
Ah yes, thank you! * Francesco Mazzoli f...@mazzo.li [2013-05-08 08:51:12+0100] At Wed, 8 May 2013 09:46:08 +0300, Roman Cheplyaka wrote: I wonder whether it's always possible to break cycles using GHC's .hs-boot files. Consider the following schematic example: module A where

Re: [Haskell-cafe] Categories (cont.)

2013-05-08 Thread Conal Elliott
Hi Wren, Have you taken this constrained categories experiment further, particularly for adding products? As I mentioned in a haskell-cafe note yesterday, I tried and got a frightening proliferation of constraints when defining method defaults and utility functions (e.g., left- or

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-08 Thread Niklas Hambüchen
Hi, I just started using your library to move my cursor. Is it possible that it ignores negative values in moveBy? In other words, I can only move the cursor into one direction. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Formal Methods/Functional programming job position at Intel

2013-05-08 Thread Levent Erkok
Our formal methods team at Intel has a full-time position available that I think would be a good fit for functional programming and formal methods enthusiasts. I'm including the description below. Do not hesitate to contact me if you've any questions, or just want to talk about it in general. To

[Haskell-cafe] Algebra in Haskell

2013-05-08 Thread Robert Goss
Dear all, There are several libraries in haskell for abstract algebra but they don't seem to cover my use case I was wondering if other people have had similar issues and if there are any packages I am missing. What I am prinicpaly interested in is operation on algebraic stuctures

Re: [Haskell-cafe] ANN: Robot - Simulate keyboard and mouse events under X11

2013-05-08 Thread Chris Wong
On Thu, May 9, 2013 at 4:47 AM, Niklas Hambüchen m...@nh2.me wrote: Hi, I just started using your library to move my cursor. Is it possible that it ignores negative values in moveBy? In other words, I can only move the cursor into one direction. I did some research, and traced this to a

[Haskell-cafe] ghci: Difference in garbage collection etc. between REPL and function

2013-05-08 Thread Niklas Hambüchen
I have an annoying bug in a C binding that can be triggered like this: handle - open ... prep - makePreparedStatement handle INSERT ... performGC runStatement prep close handle If I run these steps one by one in ghci, garbage ends up in my handle as expected. However,

Re: [Haskell-cafe] ghci: Difference in garbage collection etc. between REPL and function

2013-05-08 Thread Jason Dagit
On Wed, May 8, 2013 at 6:54 PM, Niklas Hambüchen m...@nh2.me wrote: I have an annoying bug in a C binding that can be triggered like this: handle - open ... prep - makePreparedStatement handle INSERT ... performGC runStatement prep close handle If I run these

Re: [Haskell-cafe] ghci: Difference in garbage collection etc. between REPL and function

2013-05-08 Thread Jason Dagit
On Wed, May 8, 2013 at 8:12 PM, Jason Dagit dag...@gmail.com wrote: On Wed, May 8, 2013 at 6:54 PM, Niklas Hambüchen m...@nh2.me wrote: I have an annoying bug in a C binding that can be triggered like this: handle - open ... prep - makePreparedStatement handle INSERT ...

[Haskell-cafe] Test access resources files in cabal-dev

2013-05-08 Thread Graham Berks
Hi, whats the recommended way to access a resource file for a test within cabal. I have a text file containing data that I use in a test and want to be able to access it in a root path independent manner. Thanks ___ Haskell-Cafe mailing list

[Haskell-cafe] Accessing resource files in tests

2013-05-08 Thread Graham Berks
Hi, whats the recommended way to access a resource file for a test within cabal. I have a text file containing data that I use in a test and want to be able to access it in a root path independent manner. Thanks ___ Haskell-Cafe mailing list