Giter VIP home page Giter VIP logo

Comments (5)

gmalecha avatar gmalecha commented on September 6, 2024

Are there any existing code formatters for Coq?

from stdlib2.

Zimmi48 avatar Zimmi48 commented on September 6, 2024

@gmalecha The beautifier is one but in its current state it produces quite horrible output. However, we could consider working on it again to make it a good formatter. It would typically be the kind of thing that should be available in a Coq language server (cc @ejgallego). Code formatters are a very trendy approach these days (gofmt, elm-format, etc.) to making sure that discussions on formatting do not interfere with other works and to "reducing cognitive load".

from stdlib2.

ejgallego avatar ejgallego commented on September 6, 2024

You can indeed use SerAPI to print a whole file in a slightly more controlled way, however this uses the same printer than the "beautifier", so you won't get terribly different output even if you could perform some additional tweaks thanks the to extra control.

Of course, you can parse the JSON/SEXP representation of the AST in any other language and print as you'd like.

from stdlib2.

spitters avatar spitters commented on September 6, 2024

from stdlib2.

ejgallego avatar ejgallego commented on September 6, 2024

@spitters thanks for the link, you could implement that kind of script today in a robust way using SerAPI.

from stdlib2.

Related Issues (17)

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.