Code Monkey home page Code Monkey logo

Comments (6)

mrkkrp avatar mrkkrp commented on June 26, 2024

This change was introduced in #514. In short, now MonadParsec e s (ParsecT e s m) instance requires Monad m, which was always assumed since it is the inner monad in the monad transformer, but now it has to be included in the constraints because of the new method mkParsecT which uses the bind of the inner monad m.

from megaparsec.

mrkkrp avatar mrkkrp commented on June 26, 2024

I'm curious how did it work before

All methods of MonadParsec worked directly by calling continuations and did not rely on m being a monad, i.e. they did not use monadic bind on m.

is the change necessary

Actually given that mkParsec does not make use of m (unlike mkParsecT) I think the constraint could have been avoided. I just did not think it would be problematic. I could try to remove it if it poses a problem for you.

from megaparsec.

mrkkrp avatar mrkkrp commented on June 26, 2024

See #533.

from megaparsec.

simonmichael avatar simonmichael commented on June 26, 2024

Thanks Mark. In hledger at least it's quite impactful, it will require changing ("cluttering" ?) 140 type signatures, so I wanted to check it's intended before doing that. I don't know if I'm an outlier here. If it stays, it should probably be added to the changelog. (I didn't find/recognise the responsible change by comparing haddocks either.)

from megaparsec.

mrkkrp avatar mrkkrp commented on June 26, 2024

Okay, 9.4.1 is on Hackage. It should have the same constraints as in older versions of the library.

from megaparsec.

simonmichael avatar simonmichael commented on June 26, 2024

Thank you very much!

from megaparsec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.