4 ms·
>functional combinator libraries By that, do you mean parser combinators?
by fuzztester 1y ago
>functional combinator libraries
By that, do you mean parser combinators?
- derriz 1y agoYes - 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.
- fuzztester 1y agoThanks. On a side note, I do use Python list comprehensions, and like them.
- themk 1y agoghc has the the MonadComprehension extension which does what you desire https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/monad_comprehensions.html#monad-comprehensions https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/mona...