Re: [Haskell-cafe] Re: Bit Streams

2008-06-19 Thread Adam Langley
On Wed, Jun 18, 2008 at 11:00 AM, Evan Laforge [EMAIL PROTECTED] wrote: Inclusion in the official Data.Binary would be nice, especially if it could be a drop-in replacement, say by changing the Data.Binary instance definitions to Strict.Binary or something. I have a class defined to abstract

Re: [Haskell-cafe] Re: Bit Streams

2008-06-19 Thread Adam Langley
On Wed, Jun 18, 2008 at 11:07 AM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: If you provide Applicative and Alternative instances for your getter monads (perhaps you already do?) I have Alternative instances, and they're used a fair bit in my HTTP parser (network-minihttp). You're right that I

[Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Dominic Steinitz
OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses three bytes, not three bits. Before I sit down and spend 3 months designing my own

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Don Stewart
dominic.steinitz: OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses three bytes, not three bits. Before I sit down and spend 3

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Adam Langley
On Wed, Jun 18, 2008 at 12:46 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses three

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Andrew Coppin
Dominic Steinitz wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-strict Ooo... looks interesting. Pity I can't look at any documentation for it. (Is that *really* Haddoc failing with a parse error on a pragma? Surely not...) I'll take a look at this. Thanks.

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Don Stewart
agl: On Wed, Jun 18, 2008 at 12:46 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Adam Langley
On Wed, Jun 18, 2008 at 10:52 AM, Don Stewart [EMAIL PROTECTED] wrote: Would you recommend binary-strict over bitsyntax now? Or are none yet entirely satisfactory Probably, yes. Bitsyntax was, after all, the first Haskell code I ever wrote :) It works, but I think the monad style of

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Evan Laforge
On Wed, Jun 18, 2008 at 10:43 AM, Andrew Coppin [EMAIL PROTECTED] wrote: Dominic Steinitz wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-strict Ooo... looks interesting. Pity I can't look at any documentation for it. (Is that *really* Haddoc failing with a parse

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Bryan O'Sullivan
On Wed, Jun 18, 2008 at 11:00 AM, Adam Langley [EMAIL PROTECTED] wrote: On Wed, Jun 18, 2008 at 10:52 AM, Don Stewart [EMAIL PROTECTED] wrote: Would you recommend binary-strict over bitsyntax now? Or are none yet entirely satisfactory Probably, yes. Bitsyntax was, after all, the first Haskell

Re: [Haskell-cafe] Re: Bit Streams

2008-06-18 Thread Dominic Steinitz
Don Stewart wrote: dominic.steinitz: OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses three bytes, not three bits. Before I sit