Code Monkey home page Code Monkey logo

Comments (4)

ejgallego avatar ejgallego commented on July 26, 2024

Indeed, this is handled by Sexplib, need to investigate more.

from coq-serapi.

ejgallego avatar ejgallego commented on July 26, 2024

I'm much afraid that Sexplib parser won't be easy to modify to support this use case. I'm sorry.

I propose to tag wontfix for now and try to workaround this bug.

from coq-serapi.

cpitclaudel avatar cpitclaudel commented on July 26, 2024

Sounds good. In fact, I'd say we can close this. Here's a small function that will do the trick:

(defun prin1-to-sexp (val)
  "Convert VAL to a sexp.
Crucially, renders nil as (), not nil."
  (if (listp val)
      (concat "(" (mapconcat #'prin1-to-sexp val " ") ")")
    (prin1-to-string val)))

It breaks if passed an improper list (such as (1 . 2)), but that would have confused the sertop side already :)

from coq-serapi.

ejgallego avatar ejgallego commented on July 26, 2024

Cool, thanks, even if it's a pity to have this minor difference.

Note that this could still be fixed in the future by rolling out our own parser once the whole thing is more stable, so feel free to reopen if needed.

For reference, here are Sexplib:

the last one is interesting as it will determine the escaping done by sertop's printing. I'm not opposed to rolling our own versions if we have good reasons.

from coq-serapi.

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.