Re: [Haskell-cafe] Behavior of -threaded in GHC 7.4.1?

2012-02-16 Thread Michael Craig
on why, but the notes here [1] would suggest it's because the Socket type is optimized away. In any case, putting the finalizer on the inner Ptr () seems to have fixed the problem. Mike Craig On Wed, Feb 15, 2012 at 7:02 AM, Michael Craig mks...@gmail.com wrote: Ok, so I've found that using

Re: [Haskell-cafe] Behavior of -threaded in GHC 7.4.1?

2012-02-15 Thread Michael Craig
Ok, so I've found that using the -V0 RTS flag to turn off the RTS clock (and associated signals) makes the code run fine with -threaded. I'm still digging through the implications of that, though. Has some behavior here changed in 7.4.1? Mike Craig On Tue, Feb 14, 2012 at 3:54 PM, Michael

[Haskell-cafe] Behavior of -threaded in GHC 7.4.1?

2012-02-14 Thread Michael Craig
Hi all, I'm debugging an issue with multithreading and FFI calls in 7.4.1. The code in question is the zeromq3-haskell library, which provides an FFI binding to ZeroMQ. A little background: ZeroMQ gives the programmer contexts and sockets. Contexts are thread-safe and generally used

Re: [Haskell-cafe] The State of Testing?

2012-02-08 Thread Michael Craig
Thanks Thomas, that new flag is great. Mike Craig On Tue, Feb 7, 2012 at 10:03 PM, Thomas Tuegel ttue...@gmail.com wrote: On Tue, Feb 7, 2012 at 3:23 PM, Austin Seipp mad@gmail.com wrote: If you're writing a library, you need to compile the library with `-fhpc`, i.e. put it in the

Re: [Haskell-cafe] The State of Testing?

2012-02-07 Thread Michael Craig
Thanks for the advice, all. I've got test-framework, quickcheck, and cabal's test-suite all working together nicely. Cabal seems to support using hpc to check test coverage. If I add -fhpc to the ghc-options under the test-suite, I get output like Test coverage report written to

Re: [Haskell-cafe] The State of Testing?

2012-02-07 Thread Michael Craig
install -fhpc --enable-tests' and the resulting properties executable will spit out the results when run. On Tue, Feb 7, 2012 at 3:16 PM, Michael Craig mks...@gmail.com wrote: Thanks for the advice, all. I've got test-framework, quickcheck, and cabal's test-suite all working together nicely

[Haskell-cafe] The State of Testing?

2012-02-02 Thread Michael Craig
I've been picking up Haskell as a side project for the last few months, and I'm now considering publishing some useful code I've written and reused in several small projects. So far I've done relatively little with testing (these have been non-mission-critical applications) but I feel I should get

Re: [Haskell-cafe] named pipe interface

2012-01-13 Thread Michael Craig
Brandon, can you elaborate? Are you talking about UNIX named pipes or FIFO/queue data structures in general? Mike Craig On Fri, Jan 13, 2012 at 12:39 PM, Brandon Allbery allber...@gmail.comwrote: On Fri, Jan 13, 2012 at 12:25, Serge D. Mechveliani mech...@botik.ruwrote: On Fri, Jan 13,

Re: [Haskell-cafe] Composing Enumeratees in enumerator

2012-01-01 Thread Michael Craig
: (=$=) :: Monad m = Enumeratee a1 a2 m (Step a3 m b) - Enumeratee a2 a3 m b - Enumeratee a1 a3 m b. Cheers, Mike Craig On Tue, Dec 27, 2011 at 10:12 AM, Michael Craig mks...@gmail.com wrote: Thanks for the replies, all. It's good to see that the other iteratee packages out there are addressing

Re: [Haskell-cafe] Composing Enumeratees in enumerator

2011-12-27 Thread Michael Craig
restriction when composing an enumerator with an enumeratee.) Is there a good reason why enumerator doesn't export this or something analogous? Mike Craig On Sun, Dec 25, 2011 at 10:20 PM, Conrad Parker con...@metadecks.orgwrote: On 24 December 2011 05:47, Michael Craig mks...@gmail.com wrote

[Haskell-cafe] Composing Enumeratees in enumerator

2011-12-23 Thread Michael Craig
I've been looking for a way to compose enumeratees in the enumerator package, but I've come up with nothing so far. I want this function (=$=) :: Monad m = Enumeratee a0 a1 m b - Enumeratee a1 a2 m b - Enumeratee a0 a2 m b I'm building a modular library on top of enumerator that facilitates

Re: [Haskell-cafe] Module name space question

2011-12-12 Thread Michael Craig
There is, and it's awesome: http://folk.ntnu.no/hammar/**explore-hackage/http://folk.ntnu.no/hammar/explore-hackage/ Though it can be a bit slow to load, so try not to hammer the server too hard :) Awesome indeed! Can we convince Andreas to have it update regularly? Looks like the last

[Haskell-cafe] Attoparsec: Limiting Parsers to N Bytes, or Combing Parsers?

2011-09-23 Thread Michael Craig
Suppose we want to parse a 24-bit hex color value: input :: ByteString input = af093c blah blah blah type Color = (Word8, Word8, Word8) Attoparsec.Char8 exports a nice hexadecimal parser, but it consumes all available hex-flavored input. I'd like to make it consume exactly two bytes, so I

Re: [Haskell-cafe] Attoparsec: Limiting Parsers to N Bytes, or Combing Parsers?

2011-09-23 Thread Michael Craig
23, 2011 at 11:23 PM, Evan Laforge qdun...@gmail.com wrote: BTW you probably want 'data Color = Color !Word8 !Word8 !Word8' On Fri, Sep 23, 2011 at 8:21 PM, Evan Laforge qdun...@gmail.com wrote: On Fri, Sep 23, 2011 at 8:04 PM, Michael Craig mks...@gmail.com wrote: Suppose we want to parse