Re: [Haskell-cafe] ANN: theoremquest-0.0.0

2011-03-01 Thread Dominic Mulligan
On Mon, 2011-02-28 at 19:37 -0700, Luke Palmer wrote: > But what I miss when using these proof assistants, and what I have my > eyes on, is a way to Search ALL The Theorems. In current proof > assistants, developments are still distributed in "packages" -- and a > particular development might hav

Re: [Haskell-cafe] Rebindable 'let' for observable sharing?

2011-03-01 Thread Tillmann Rendel
Hi, Bas van Dijk wrote: For the record: are you talking about rewriting: let f = e in b into something like: (\f -> e) `letin` (\f -> b) where `letin` can be overloaded ("rebinded" is probably the better term) and has the default implementation: letin :: (a -> a) -> (a -> b) -> b fe `

Re: [Haskell-cafe] SMP parallelism gains inferior than expected

2011-03-01 Thread Simon Marlow
On 24/02/2011 13:26, José Pedro Magalhães wrote: (Forwarding to haskell-cafe) Hi, I have a program that computes a matrix of Floats of m rows by n columns. Computing each Float is relatively expensive. Each line is completely independent of the others, so I thought I'd try some simple SMP paral

[Haskell-cafe] HaXml combinators

2011-03-01 Thread DCE
Hello, I'm trying to use HaXml to do some relatively simple XML processing, but I can't figure out how to get started. My documents look something like this: I want to find any element tagged that has an attribute bar=y, then find the element unde

[Haskell-cafe] A simple attoparsec question

2011-03-01 Thread Robert Clausecker
Hi Haskellers! I'm currently trying to write an assembler for Knuths MMIXAL language. Currently, I'm writing the parser using attoparsec, and have one question: In MMIXAL, a string literal starts with a ", followed by an arbitrary amount of arbitrary characters excluding the newline character and

Re: [Haskell-cafe] A simple attoparsec question

2011-03-01 Thread Evan Laforge
>  parseConstant = Reference <$> try parseLocLabel >              <|> PlainNum <$> decimal >              <|> char '#' *> fmap PlainNum hexadecimal >              <|> char '\'' *> (CharLit <$> notChar '\n') <* char '\'' >              <|> try $ (char '"' *> (StringLit . B.pack <$> >                

Re: [Haskell-cafe] A simple attoparsec question

2011-03-01 Thread Daniel Fischer
On Tuesday 01 March 2011 22:15:38, Robert Clausecker wrote: > > I hope, you understand my question. Not sure. If I understand correctly, if you have someParser = foo <|> bar <|> parseConstant <|> baz <|> quux and invoke someParser on something like "\"Line\nLine\"" it tries ba

Re: [Haskell-cafe] A simple attoparsec question

2011-03-01 Thread Steve Schafer
On Tue, 01 Mar 2011 22:15:38 +0100, you wrote: >The problem is, that attoparsec just silently fails on this kind of >strings and tries other parsers afterwards, which leads to strange >results. Can you give a concrete example of the problem that you're seeing here? (Basically, you're describing e

[Haskell-cafe] operations on lists with continuations

2011-03-01 Thread Evan Laforge
I have a few functions for operating on lists that take continuations: -- | Like takeWhile but with a continuation, so you can chain takes without -- copying. takeWhileThen :: (a -> Bool) -> ([a] -> [a]) -> [a] -> [a] takeWhileThen _ _ [] = [] takeWhileThen f cont (x:xs) | f x = x : takeWhileT