
Iteratee-parsec is a library which allows to have a parsec (3) parser in Iteratee monad. It contains 2 implementations: - John Lato's on public domain. It is based on monoid and design with short parsers in mind. - Mine on MIT. It is based on single-linked mutable list. It seems to be significantly faster for larger parsers - at least in some cases - but it requires a monad with references (such as for example IO or ST). The version 0.0.4 is ported to iteratee 0.4. Regards

On 8/28/10 1:48, Maciej Piechotka wrote:
Iteratee-parsec is a library which allows to have a parsec (3) parser in Iteratee monad.
It contains 2 implementations: - John Lato's on public domain. It is based on monoid and design with short parsers in mind. - Mine on MIT. It is based on single-linked mutable list. It seems to be significantly faster for larger parsers - at least in some cases - but it requires a monad with references (such as for example IO or ST).
Your Reference class is very useful on its own. Do you think you could move it to a separate package? And perhaps rename it class MonadReference (or MonadRef), similar to other monad type classes. Martijn.

On Mon, 2010-09-06 at 10:40 +0200, Martijn van Steenbergen wrote:
On 8/28/10 1:48, Maciej Piechotka wrote:
Iteratee-parsec is a library which allows to have a parsec (3) parser in Iteratee monad.
It contains 2 implementations: - John Lato's on public domain. It is based on monoid and design with short parsers in mind. - Mine on MIT. It is based on single-linked mutable list. It seems to be significantly faster for larger parsers - at least in some cases - but it requires a monad with references (such as for example IO or ST).
Your Reference class is very useful on its own. Do you think you could move it to a separate package?
It's noted in comment ;) As requested I'll upload it today.
And perhaps rename it class MonadReference (or MonadRef), similar to other monad type classes.
Hmm. The problem is that it is more about reference then monad. If I would use any functional dependencies it would be: class Reference r m | r -> m where ... if any type families then: class Monad (ReferenceMonad r) => Reference r where type ReferenceMonad r :: * -> * ... The reverse does not apply as: instance Reference IORef IO instance Reference MVar IO I don't thing MonadReference/MonadRef is good name (I'll push reference package with old name - possibly renaming it later).
Martijn.
Regards

Hello Maciej, Tuesday, September 7, 2010, 12:09:33 AM, you wrote:
Your Reference class is very useful on its own. Do you think you could move it to a separate package?
It's noted in comment ;) As requested I'll upload it today.
btw, are you seen this: http://www.haskell.org/haskellwiki/Library/ArrayRef#Monad-independent_refere... -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Tue, 2010-09-07 at 01:06 +0400, Bulat Ziganshin wrote:
Hello Maciej,
Tuesday, September 7, 2010, 12:09:33 AM, you wrote:
Your Reference class is very useful on its own. Do you think you could move it to a separate package?
It's noted in comment ;) As requested I'll upload it today.
btw, are you seen this: http://www.haskell.org/haskellwiki/Library/ArrayRef#Monad-independent_refere...
No. Thanks for showing it. I think there is difference in implementation rather then concepts - ArrayRef disallows many references per monad while I fill MVar is not very different from IORef on some level Also ArrayRef is not ported to ghc 6.12. I will upload the package rather soon. Along with announcement I will send RFC with a few options ;) Regards
participants (3)
-
Bulat Ziganshin
-
Maciej Piechotka
-
Martijn van Steenbergen