Re: [Haskell-cafe] catamorphisms and attribute grammars

2013-01-27 Thread Petr P
Hi Chris, thanks for insightful links. At the first glance, I think the main difference is that machines and iteratees process streams of data, while catamorphisms work on general recursive data structures. (I used count + sum in the example, which could lead to the impression that it's list

Re: [Haskell-cafe] catamorphisms and attribute grammars

2013-01-27 Thread Petr P
Roman, this is interesting. Is this arrow generalization in some library already? And does it have a name? Best regards, Petr Pudlak 2013/1/27 Roman Cheplyaka r...@ro-che.info * Petr P petr@gmail.com [2013-01-26 23:03:51+0100] Dear Haskellers, I read some stuff about attribute

[Haskell-cafe] Where did the Cabal manual go?

2013-01-27 Thread Richard Cobbe
I'm not able to access the cabal manual today: links to my local copy and links to the copy at haskell.org result in a 404. I'm running the Haskell Platform, 2012.4.0.0, 64-bit, OS X 10.8.2. On my first attempt this morning, I loaded file:///Library/Haskell/doc/start.html in my browser and

Re: [Haskell-cafe] How to store Fixed data type in the database with persistent ?

2013-01-27 Thread Michael Snoyman
On Jan 27, 2013 8:46 AM, alexander.vershi...@gmail.com wrote: Sat, Jan 26, 2013 at 12:21:02PM +0600, s9gf4...@gmail.com wrote According to the documentation, SQLite stores whatever you give it, paying very little heed to the declared type. If you get SQLite to *compare* two numbers, it

Re: [Haskell-cafe] Where did the Cabal manual go?

2013-01-27 Thread Felipe Almeida Lessa
Do you mean the Cabal User Guide? http://www.haskell.org/cabal/users-guide/ On Sun, Jan 27, 2013 at 1:07 PM, Richard Cobbe co...@ccs.neu.edu wrote: I'm not able to access the cabal manual today: links to my local copy and links to the copy at haskell.org result in a 404. I'm running the

Re: [Haskell-cafe] Where did the Cabal manual go?

2013-01-27 Thread Richard Cobbe
On Sun, Jan 27, 2013 at 03:47:38PM -0200, Felipe Almeida Lessa wrote: Do you mean the Cabal User Guide? http://www.haskell.org/cabal/users-guide/ Yes, that's it, and I'm in the process of downloading a copy now (so I can work without a WiFi connection). I'm still curious about why there's a

Re: [Haskell-cafe] Where did the Cabal manual go?

2013-01-27 Thread Richard Cobbe
On Sun, Jan 27, 2013 at 01:48:06PM -0500, Richard Cobbe wrote: On Sun, Jan 27, 2013 at 03:47:38PM -0200, Felipe Almeida Lessa wrote: Do you mean the Cabal User Guide? http://www.haskell.org/cabal/users-guide/ Yes, that's it, and I'm in the process of downloading a copy now (so I can work

Re: [Haskell-cafe] catamorphisms and attribute grammars

2013-01-27 Thread Doaitse Swierstra
You have applied the so-called banana-split theorem, as described e.g. in http://www.cs.ox.ac.uk/jeremy.gibbons/publications/acmmpc-calcfp.pdf Indeed you are right in noticing the correspondence between AG's and catamorphims; actually I see AG's as a domain specific language for constructing

[Haskell-cafe] GHC.Generics and newtypes

2013-01-27 Thread Roman Cheplyaka
Hi, Is it possible to generate different instances for newtypes and datatypes using GHC.Generics? Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC.Generics and newtypes

2013-01-27 Thread José Pedro Magalhães
Hi Roman, Yes, the automatic derivation of Generic instances does not see through newtypes. Cheers, Pedro On Sun, Jan 27, 2013 at 8:17 PM, Roman Cheplyaka r...@ro-che.info wrote: Hi, Is it possible to generate different instances for newtypes and datatypes using GHC.Generics? Roman

Re: [Haskell-cafe] GHC.Generics and newtypes

2013-01-27 Thread Roman Cheplyaka
Sorry, I wasn't clear. What I want is somehow to find out whether the type under consideration is declared using data or newtype. Is it possible? Roman * José Pedro Magalhães j...@cs.uu.nl [2013-01-27 20:29:52+] Hi Roman, Yes, the automatic derivation of Generic instances does not see

Re: [Haskell-cafe] GHC.Generics and newtypes

2013-01-27 Thread José Pedro Magalhães
Ah, no. But that would be easy to add to the Datatype classhttp://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/GHC-Generics.html#g:3, I think. Perhaps open a feature request? Cheers, Pedro On Sun, Jan 27, 2013 at 8:34 PM, Roman Cheplyaka r...@ro-che.info wrote: Sorry, I wasn't

Re: [Haskell-cafe] GHC.Generics and newtypes

2013-01-27 Thread Roman Cheplyaka
Sure. Should it go to the GHC bug tracker? Roman * José Pedro Magalhães j...@cs.uu.nl [2013-01-27 20:36:54+] Ah, no. But that would be easy to add to the Datatype classhttp://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/GHC-Generics.html#g:3, I think. Perhaps open a feature

Re: [Haskell-cafe] Suggestiong for inter-thread communication

2013-01-27 Thread Tim Docker
Hi Eric, In a previous project, I chose vty over ncurses: - you can write your own event loop, and hence handle different event sources. - more liberal license (BSD3 versus GPL) Tim On 26/01/13 19:24, Erik de Castro Lopo wrote: Hi all, I am in the process of writing a Haskell