Re: [Haskell-cafe] Best approach to avoid dependency hells

2012-12-07 Thread Albert Y. C. Lai
On 12-12-05 01:52 PM, Ivan Perez wrote: I've spent the last couple of days fighting my way around a dependency hell with my own libraries and packages. If I install them package by package (by hand), I'm very likely to hit one of these conflicts that I'm talking about. A simple example of someth

Re: [Haskell-cafe] Understanding GHC's instance inference.

2012-12-07 Thread Takayuki Muranushi
Thank you, Adam, for I didn't know about paczesiowa's article. That will be useful for me. What I was trying to make is a zipWithN that takes the zipper function as its "last" argument, not the first. This is because in my applications the zipper functions tend to be complicated lambdas, as illus

Re: [Haskell-cafe] Is it possible to have constant-space JSON decoding?

2012-12-07 Thread Albert Y. C. Lai
On 12-12-05 12:48 AM, Jason Dagit wrote: I thought it was possible to get around this with lazy patterns such "Wadler's force function" [1]? (untested code) force y = let Just x = y in Just x lazyDecode :: FromJSON a => ByteString -> Maybe a lazyDecode = force . decode This says, the t

Re: [Haskell-cafe] Maintainer of fixpoint

2012-12-07 Thread Petr P
Thanks Brent, that's just what I needed. I'm switching to recursion-schemes immediately. Best regards, Petr 2012/12/6 Brent Yorgey > On Wed, Dec 05, 2012 at 08:22:32PM +0100, Petr P wrote: > >Dear Haskellers, > > > > I've made some minor improvements of fixpoint package < > > http://hackag

Re: [Haskell-cafe] yaml and aeson Was: Growing Haskell Platform

2012-12-07 Thread Michael Snoyman
On Fri, Dec 7, 2012 at 12:00 PM, Roman Cheplyaka wrote: > * Michael Snoyman [2012-12-07 11:51:40+0200] > > > As for toYAML/toJSON, I guess most of the time they are different > anyway — > > > otherwise it's defeating the purpose of YAML to be more human-readable > > > than JSON. > > > > > > > >

Re: [Haskell-cafe] yaml and aeson Was: Growing Haskell Platform

2012-12-07 Thread Roman Cheplyaka
* Michael Snoyman [2012-12-07 11:51:40+0200] > > As for toYAML/toJSON, I guess most of the time they are different anyway — > > otherwise it's defeating the purpose of YAML to be more human-readable > > than JSON. > > > > > I don't think that's true in practice. Most of the readability of YAML > c

Re: [Haskell-cafe] Is it possible to have constant-space JSON decoding?

2012-12-07 Thread Malcolm Wallace
See also the incremental XML parser in HaXml, described in "Partial parsing: combining choice with commitment", IFL 2006. It has constant space usage (for some patterns of usage), even with extremely large inputs. http://www.google.co.uk/url?sa=t&rct=j&q=malcolm+wallace+partial+parsing&source=w

[Haskell-cafe] yaml and aeson Was: Growing Haskell Platform

2012-12-07 Thread Michael Snoyman
On Fri, Dec 7, 2012 at 10:54 AM, Roman Cheplyaka wrote: > * Michael Snoyman [2012-12-07 09:52:07+0200] > > Let me bring up one other package: yaml (written by me). I think it's a > > pretty good fit for the standard YAML packaging library, since it simply > > reuses the existing infrastructure f