I know that Megaparsec doesn't backtrack automatically and that you have to use "try" for that, but this behavior of "many" was unexpected. Why oh why doesn't it parse the final space? https://stackoverflow.com/a/78355045/1364288
Maybe I didn't read the documentation thoroughly, but I don't think it's actually spelled out in the Haddocks?
Ok, the heart of the matter is the Alternative instance on which the "many" and "optional" combinators depend.
As the docs say, "empty is a parser that fails without consuming input". So a parser that fails while consuming input can't be equated to "empty". I guess the moral of the story is that one should almost always use "try" with Alternative-y combinators.
@DiazCarrete You have a choice between space and space, so you need try. In general, having choices start with space is not a good idea. Consume space after other content, not before.
The GHC developers are very pleased to announce the release of GHC 9.10.1! 🎉
On the menu:
→ GHC2024 language edition
→ Linear let and where
bindings
→ Annotation of exceptions with backtraces
→ Required type arguments for functions
→ Javascript FFI support in the WebAssembly backend
… and many more!
Between the continued iteration on the GHC20xx meta-extension mechanisms, further improvements in the JS/wasm backends, and (my favorite) the availability of exception backtraces in base, there is lots in this release to be excited about.
See the Haskell Discourse thread for the full announcement:
On Wednesday, 2024-05-15, at 1830 UTC, we'll stream the 25th episode of the #Haskell#Unfolder. This episode should be interesting for Haskellers and non-Haskellers alike. Edsko and I will translate a #gRPC server from #Java to Haskell, contrasting the programming paradigms.
Hey, #Haskell, what's the more conservative extension to the report?
I think I can do what I want either way, but I don't really know how to do it in Haskell2010 with no extensions. (I have a non-parameteric type function/family in my semantics, and don't want to give up totality.)
@BoydStephenSmithJr I voted RankNTypes. Arguments in favour: RankNTypes (or at least Rank2Types) existed long before GADTs, and RankNTypes can be translated into "plain" Fω Core, without needing any equality constraints like FC.
Last week I prototyped a git remote helper in a shell script, and now I'm rewriting that in #haskell as part of #gitAnnex.
I don't do this often and I wonder if it was a mistake, probably I should have written the prototype in haskell and then integrated it into git-annex. It's kind of amazing how a lot of complexity is melting away and also how I'm adding So Many Types and also throwing in a lot of robustness improvements.