Re: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-13 Thread Maciej Piechotka
On Wed, 2011-01-12 at 18:15 -0800, Evan Laforge wrote: On Mon, Dec 27, 2010 at 6:51 AM, Evan Laforge qdun...@gmail.com wrote: I've uploaded attoparsec-text and attoparsec-text-enumerator to Hackage. I've written those packages late last week and asked for Very nice! I'll download this

Re: [Haskell-cafe] Haskell for Gingerbread

2011-01-13 Thread Stefan Kersten
On 28.12.10 21:25, John Meacham wrote: jhc generated C works on the android/ARM just fine. Android specific libraries arn't available, so you would have to bind to what you want with the FFI. is there a recommended procedure for porting code from GHC to JHC? i'd like to port an application of

Re: [Haskell-cafe] Haskell for Gingerbread

2011-01-13 Thread John Meacham
On Thu, Jan 13, 2011 at 3:07 AM, Stefan Kersten s...@k-hornz.de wrote: On 28.12.10 21:25, John Meacham wrote: jhc generated C works on the android/ARM just fine. Android specific libraries arn't available, so you would have to bind to what you want with the FFI. is there a recommended

Re: [Haskell-cafe] H98, OOHaskell - getting started with objects in Haskell

2011-01-13 Thread snk_kid
gutti philipp.guttenberg at gmx.net writes: Hi, I wanted to check whether Haskell offers reasonably easy object oriented programming -- I already had a look into Haskell's overlooked object system und A Gentle Introduction to Haskell 98 [H98] I think you're better off starting by

Re: [Haskell-cafe] Misleading MVar documentation

2011-01-13 Thread Edward Z. Yang
Ok, here is an updated doc patch. I've also added a substantial introduction section. diff -rN -u old-base/Control/Concurrent/MVar.hs new-base/Control/Concurrent/MVar.hs --- old-base/Control/Concurrent/MVar.hs 2011-01-13 16:26:59.0 + +++ new-base/Control/Concurrent/MVar.hs

Re: [Haskell-cafe] Haskell for Gingerbread

2011-01-13 Thread Henning Thielemann
John Meacham wrote: On Thu, Jan 13, 2011 at 3:07 AM, Stefan Kersten s...@k-hornz.de wrote: On 28.12.10 21:25, John Meacham wrote: jhc generated C works on the android/ARM just fine. Android specific libraries arn't available, so you would have to bind to what you want with the FFI. is there a

[Haskell-cafe] Writer monad corresponds to synthesized attribute?

2011-01-13 Thread Sean Leather
I have been attempting to translate something I did using UUAG into monadic code. It involved inherited, synthesized, and chained attributes. It has been said that such attributes correspond to the Reader, Writer, and State monads, respectively [1]. The former and latter are straightforward, but

Re: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-13 Thread Permjacov Evgeniy
On 12/23/2010 06:01 AM, Evan Laforge wrote: This is not very encouraging! Especially strange is how Text generates *more* allocation... I'd expect less since it doesn't unpack all the Texts. Errgh. To check against predicate, library HAS to unpack checked character. There is no way around

Re: [Haskell-cafe] Writer monad corresponds to synthesized attribute?

2011-01-13 Thread Stephen Tetley
Hi Sean Synthesized attributes are a bit more general than a Writer as there is no restriction to monoidal values. I might have re-worked UUAG code to monadic code before, but if I did it would have been simple stuff and I think I'd have just used State, or maybe State + Reader. Best wishes

[Haskell-cafe] ANN: extcore 1.0

2011-01-13 Thread Tim Chevalier
Hello, I've recently released version 1.0 of extcore, a library for processing code in GHC's text-based External Core format. extcore includes a parser, prettyprinter, typechecker, and interpreter for External Core, as well as modules for computing module dependencies and combining multiple Core

[Haskell-cafe] Monad transformer: apply StateT to List monad

2011-01-13 Thread michael rice
{- From: http://en.wikibooks.org/wiki/Haskell/Monad_transformers if for instance we apply StateT to the List monad, a function that returns a list (i.e., a computation in the List monad) can be lifted into StateT s [], where it becomes a function that returns a StateT (s - [(a,s)]). That is, the

Re: [Haskell-cafe] web-routes and forms

2011-01-13 Thread Corentin Dupont
Hello, I'm using the combination happstack + digestive-functors + web-routes + blazeHTML. I'm not finding any examples on the net... I've tried to adapt your example (thanks): type NomicForm a = HappstackForm IO String BlazeFormHtml a demoForm :: NomicForm (Text, Text) demoForm = (,) $

Re: [Haskell-cafe] Monad transformer: apply StateT to List monad

2011-01-13 Thread Daniel Fischer
On Thursday 13 January 2011 21:17:41, michael rice wrote: {- From: http://en.wikibooks.org/wiki/Haskell/Monad_transformers if for instance we apply StateT to the List monad, a function that returns a list (i.e., a computation in the List monad) can be lifted into StateT s [], where it becomes

Re: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-13 Thread Albert Y. C. Lai
On 11-01-13 02:07 PM, Permjacov Evgeniy wrote: BTW, how much utf16 text is around? I never found any in wild web. There is a lot of utf16 text in memory chips when you use Windows or Java. In the case of Windows there is also a lot on disk platters as file names. A scanning electron

[Haskell-cafe] Mailing lists on projects.haskell.org?

2011-01-13 Thread Erik de Castro Lopo
Hi all, I tried sending mail to the haskell-llvm mailing list ( AT projects.haskell.org) several days ago and today I received a bounce message. Looking into the issue a little further, I find that DNS has no MX record for projects.haskell.org and projects.haskell.org doesn't seem to be

Re: [Haskell-cafe] H98, OOHaskell - getting started with objects in Haskell

2011-01-13 Thread gutti
Hi, thanks for all Your answers (and again I'm amazed how active and good this forum is). I expected OOHaskell to be on the somewhat extended side, but I didn't expect it to be so uncommon. This very strong and clear feedback is indeed very valuable. I think I see the complexities of

Re: [Haskell-cafe] Monad transformer: apply StateT to List monad

2011-01-13 Thread michael rice
Hi Daniel, What I need to see is a function, say g, that lifts the function f (in the List monad) into the StateT monad, applies it to the monad's value, say 1, and returns a result [0,1]. Or, alternatively, code that lifts a function in the State monad, say tick import Control.Monad.State

[Haskell-cafe] questions about network.curl/ web client programming

2011-01-13 Thread Michael Litchard
I'm learning both haskell and web programming as I go here, this question entails both. I'm writing a screen scraping program, and I'm at the point where I need to send certain data in the header. My question is, is that what method_HEADER is for? If so, could I see an example? If not, how does

Re: [Haskell-cafe] Monad transformer: apply StateT to List monad

2011-01-13 Thread John Millikin
Lifting 'f' into StateT -- you get a list of (result, state) pairs. Since the state is never modified, the second half of each pair is identical: -- import Control.Monad.State f :: Int - [Int] f n = [0..n] -- lifting 'f'

Re: [Haskell-cafe] Monad transformer: apply StateT to List monad

2011-01-13 Thread michael rice
Thanks, John. Too late to do much now, but it looks like what I was needing, and more.  May have more questions after I examine it more closely tomorrow. Michael --- On Fri, 1/14/11, John Millikin jmilli...@gmail.com wrote: From: John Millikin jmilli...@gmail.com Subject: Re: [Haskell-cafe]