Giter Club home page Giter Club logo

Comments (7)

cristianoc avatar cristianoc commented on August 28, 2024

I was thinking the same.

from reason.

jordwalke avatar jordwalke commented on August 28, 2024

The pretty printer currently uses objects/classes, and those were recently disabled (because they deferred to the build in pretty printer). We could either trivially make it not use objects (a bunch of recursive let bindings instead) or implement objects.

I have a giant stack of diffs that I'm waiting to land as soon as the Easy_format changes are pushed to OPAM, so I think it would be best to implement it after I land those to prevent many merge conflicts.

from reason.

yunxing avatar yunxing commented on August 28, 2024

I think we are almost ready for this.

from reason.

yunxing avatar yunxing commented on August 28, 2024

This is depending on #63

from reason.

jordwalke avatar jordwalke commented on August 28, 2024

I thought this would be difficult to self-host because of the challenges in building Reason from source, when you don't have an available Reason. But then I realized we can use a simple trick. The OCaml compiler (supposedly) supports loading files that are simply serialized ASTs. (The same output that -pp accepts, and the same output that refmt spits out by default).

So we can simply check in the serialized AST for reason_pprint_ast and friends. Our build scripts for Reason can simply disregard the actual .re files and only ever build the serialized AST files. The result is that it successfully builds a version of Reason that is a binary, even if Reason was not originally installed.

from reason.

yunxing avatar yunxing commented on August 28, 2024

@jordwalke Interesting idea. If we are able to do that, I imagine we can even write parsers in reason as well (need to add a -pp option in Menhir first).

from reason.

chenglou avatar chenglou commented on August 28, 2024

Stale, will keep it in ocaml for now

from reason.

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.