Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Support for DrRacket arrows and renaming #23

Open
soegaard opened this issue Jul 9, 2015 · 4 comments
Open

Support for DrRacket arrows and renaming #23

soegaard opened this issue Jul 9, 2015 · 4 comments
Assignees

Comments

@soegaard
Copy link

soegaard commented Jul 9, 2015

After syntax checking DrRacket supports some nice features:

  • Hovering over an identifier shows an arrow to its binding
  • Rightclicking an identifier allows (lexical scope aware) renaming of identifiers
    All identifiers with the same binding are renamed.

Consider this program:

#lang nanopass
(define-language L
  (entry Expr)
  (terminals (number (r)))
  (Expr (e) r))

(with-output-language (L Expr) 1)

I would like to rename L but the renaming option is not available.
In order to support renaming one has to add properties:

http://docs.racket-lang.org/tools/Check_Syntax.html?q=sub-binder#%28idx._%28gentag._28._%28lib._scribblings%2Ftools%2Ftools..scrbl%29%29%29

Note that if the property 'sub-range-binders is used then a renaming of L to M
will also rename unparse-L to the unparse-M.

@LeifAndersen
Copy link
Collaborator

Yes, I am all up for adding these properties.

Although this does lead to the question of do we want to continue to strip the ? off of predicates in terminals?

(If we stop stripping them off we do get support for the arrows. Although if we don't, then we can just add the check syntax property's back.)

After playing with it a bit both ways I'm pretty ambivalent as it hasn't made much of an impact either way. Although whenever I describe nanopass to other people who have used racket they have complained to me about that.

@soegaard
Copy link
Author

2015-07-11 23:26 GMT+02:00 Leif Andersen [email protected]:

Yes, I am all up for adding these properties.

Although this does lead to the question of do we want to continue to strip
the ? off of predicates in terminals?

(If we stop stripping them off we do get support for the arrows. Although
if we don't, then we can just add the check syntax property's back.)

Both would work.

After playing with it a bit both ways I'm pretty ambivalent as it hasn't
made much of an impact either way. Although whenever I describe nanopass to
other people who have used racket they have complained to me about that.

Complained about which part?

/Jens Axel

@LeifAndersen
Copy link
Collaborator

Complained about which part?

Complained about the question marks disappearing. (They would rather the full predicate be there.) So it would look like:

(define-language L0
(terminals
(symbol? (x))))

Although I'm good either way.

Anyway, PR# 31 does deal with this issue. Although I wouldn't close it just yet. (As there is likely more arrows we wish to have.)

@soegaard
Copy link
Author

@LeifAndersen Is it time to close it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants