Comments (7)
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.
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.
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.
Sure
from ppxlib.
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.
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.
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)
- `Code_path.main_module_name` is sensitive to line directives
- Having flag attributes is cumbersome with current API HOT 13
- Allow arguments of derivers to have default values HOT 1
- metaquot does not transfer attributes
- Possibly wrong link for merlin HOT 1
- ppxlib#trunk-support on 5.1.0~alpha1 breaks `let f: type a.` syntax HOT 4
- ppxlib 5.2 trunk-support needs value_constraint support HOT 6
- trunk-support does't build with ocaml-trunk HOT 5
- Fix 5.1 migrations for generative functor applications HOT 10
- `Ast_builder.Default.pexp_tuple` on empty list HOT 1
- Performance analysis
- Server mode
- Reduce the number of AST traversals
- Reserving an attribute namespace with a dot has unexpected semantics
- Ppxlib’s behaviour in case of raised exception. HOT 2
- trunk-support does't build with ocaml-trunk HOT 10
- Fixpoint and monadic combinators for `Ast_pattern` HOT 1
- Attributes in `Ast_builder.Default` and `Ast_pattern` HOT 3
- The tests fail when using OCaml 5.1.1 HOT 7
- Add a driver mode with no output if there is no rewriting to do HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppxlib.