GithubHelp home page GithubHelp logo

[RFC] Integrate ppx_view about ppxlib HOT 7 CLOSED

ocaml-ppx avatar ocaml-ppx commented on June 3, 2024
[RFC] Integrate ppx_view

from ppxlib.

Comments (7)

 avatar commented on June 3, 2024 3

I'm closing this for now. This plan is a step forward but doesn't go far enough. The new plan is to add first a minimal and stable API for ppx rewriters in the compiler, then we will be able to refactor ppxlib and other ppx libraries on top of this new library. Once this is done, changes to the compiler libraries should cause no breakage in the ppx ecosystem. In particular, it will become possible to test development compilers against released opam packages.

I'm currently writing a proposal for the stable API.

from ppxlib.

 avatar commented on June 3, 2024 1

I was thinking about this again. If we simply upstream the View and Ast_viewer modules of ppx_view into the compiler directly, then we would get the best possible world: all the ppx ecosystem could use the current AST without any conversion and without risk of breaking with new compiler versions, and the for compiler updating Ast_viewer when changing the parsetree would be no harder than updating Ast_helper.

from ppxlib.

trefis avatar trefis commented on June 3, 2024

I'd like to have a look at this before it gets merged if you don't mind.
I'll approve / comment when I'm done.

from ppxlib.

 avatar commented on June 3, 2024

Sure

from ppxlib.

rgrinberg avatar rgrinberg commented on June 3, 2024

Possibly a naive question, but why would do we need to support both builder & helper style for patterns & constructors? Seems like pattern/builder provide nicer conventions, can't we just use those exclusively?

from ppxlib.

xclerc avatar xclerc commented on June 3, 2024

If memory serves, it was basically to explore the design space.
I implemented toy versions of various ppx rewriters to see how
they would look like; feel free to remove the cruft.

from ppxlib.

 avatar commented on June 3, 2024

The idea is indeed to support only pattern/builder style. However, the current Ast_pattern should be re-implemented on top of the View module.

from ppxlib.

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.