Giter Club home page Giter Club logo

Comments (6)

cpitclaudel avatar cpitclaudel commented on June 21, 2024

Hi Jonathan,

Indeed; there is such a convention; we originally discussed it on the beta thread. The documentation mentions it, but it could be more explicit:

Emacs                 Atom     Action
-------------------------------------------------------------------------------------
C-c C-n               C-S-n    Process the next block (terminated by two empty lines)

The trick is, there are two opposing constraints here:

  • Make it convenient to process everything up to a point
  • Auto-detect block boundaries so that it's possible to process just the next block, and so that rewinding after processing a large section does not rewind the entire section

If I map C-c C-RET to "process everything up to this point, extending to the next block boundary", then you loose fine-grained control over what gets sent (unless you use double newlines already)

OOTH, if I map C-c C-RET to "process everything up to this point exactly", then being in the middle of a definition confuses the REPL.

Finally, if I take the first approach but make a single new line the block delimiter, then definitions like

let a = 
  blah

and let b =
  bluh

can't be sent to the interpreter...

I'm not sure if we can solve this issue unless there's a clear block delimiter. Until then, I can add a setting for C-c C-RET to only send full blocks (as delimited by a double empty line).

from fstar-mode.el.

msprotz avatar msprotz commented on June 21, 2024

Hmm right. My bad, I should've seen this in the README. I guess I shouldn't be using C-c C-RET unless I'm really sure where my cursor is, then.

What about the fact that F* is sent in a bad state? I assume this is something you have no control over?

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on June 21, 2024

Not sure about the bad state :) I'll check this week-end!

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on June 21, 2024

The trick about the cursor position is that you probably just want to use C-c C-n most of the time.

from fstar-mode.el.

cpitclaudel avatar cpitclaudel commented on June 21, 2024

Can you give me more details about the weird state; maybe a file that shows this behaviour? I have trouble reproducing it.

from fstar-mode.el.

msprotz avatar msprotz commented on June 21, 2024

I can't reproduce, sorry. I'll re-open if I find a proper testcase.

from fstar-mode.el.

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.