Remix.run Logo
fuzztester 4 days ago

>functional combinator libraries

By that, do you mean parser combinators?

derriz 3 days ago | parent [-]

Yes - but this was decades ago so my memory is hazy. It was with an early Haskell variant called Gofer - which had a nice feature which allowed using list comprehension notation with arbitrary monads - which for simple grammars produced very readable - even beautiful - parser code. But like with parser generators, once the grammar became complex, the beauty and simplicity disappeared.

Actually I wish this generalization of list comprehensions had been taken up by Haskell or other languages. Haskell decided on the do notation while Python users these days seem to shun the feature.

themk 3 days ago | parent | next [-]

ghc has the the MonadComprehension extension which does what you desire

https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/mona...

fuzztester 3 days ago | parent | prev [-]

Thanks.

On a side note, I do use Python list comprehensions, and like them.