ziman / lightyear

Parser combinators for Idris
Other
238 stars 43 forks source link

Fix JSON example #11

Closed timjb closed 10 years ago

timjb commented 10 years ago

This works again:

Idris> :load examples/Json.idr
*examples/Json> parse jsonValue "{\n  \"c"hallo\":42,\"nichts\":null}"
Right (JsonObject (M 1
                     (Branch2 (Leaf "hallo" (JsonNumber 42.0))
                              "hallo"
                              (Leaf "nichts" JsonNull)))) : Either String
                                                                   JsonValue

I hope this solves https://github.com/ziman/lightyear/issues/10.

david-christiansen commented 10 years ago

Just out of curiosity, why did you need to change the lambdas in Core.idr? I think it's a better style, but it shouldn't have a semantic difference. If it did, then there should be a bug report.

ziman commented 10 years ago

Thanks for fixing #10!

While it might be cleaner to make cosmetic changes in a separate request, I don't think it matters too much in this case.

timjb commented 10 years ago

As @ziman said, it's just a cosmetic change, there's no semantic difference. Am 20.04.2014 11:39 schrieb "David Christiansen" notifications@github.com:

Just out of curiosity, why did you need to change the lambdas in Core.idr? I think it's a better style, but it shouldn't have a semantic difference. If it did, then there should be a bug report.

— Reply to this email directly or view it on GitHubhttps://github.com/ziman/lightyear/pull/11#issuecomment-40891411 .