Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Parsing layout – problems with Haskell's syntax (2021) (amelia.how)
54 points by g0xA52A2A on Jan 9, 2023 | hide | past | favorite | 6 comments


Way more interesting than I expected.

One of the things I learned was that even though I would have described myself as comfortable writing Haskell code... I sure never learned all of the fundamentals of how it is parsed.

All of the details are in the article - all of them - so there's a lot I didn't read. If I were implementing a parser, I read this carefully.

The most interesting part was the explanation that parsing this statement:

     foo = let x = 1 in x
involves realizing that one interpretation leads to a parse error, so an extra closing brace } should be emitted at the end.




Thanks, I changed the URL to that from the (broken) https://abby.how/posts/parsing-layout.html


It is not loading for me either, but there is a copy at the Internet Archive:

https://web.archive.org/web/20211015184656/https://abby.how/...


DNS, y u no resolve?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: