Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: show types of indicated terms. #516

Open
GoogleCodeExporter opened this issue Aug 8, 2015 · 3 comments
Open

Feature request: show types of indicated terms. #516

GoogleCodeExporter opened this issue Aug 8, 2015 · 3 comments
Labels
type: enhancement Issues and pull requests about possible improvements ux: emacs Issues relating to the Emacs agda2-mode
Milestone

Comments

@GoogleCodeExporter
Copy link

What's the problem? Cut-and-pasted program examples are preferred over
attachments (if reasonably short).

When the cursor is in a goal, I can get the type of an expression by typing C-c 
C-d. I would like to have two enhancements of this feature:

1. C-c C-d sometimes work even when the cursor is not in a goal. This seems to 
be true for closed terms. But I would like to have this even for open terms. As 
it is now, agda reports "not in scope x ...", even if the cursor is in a 
position where x is known. To figure out the type, I either have to do it in my 
head, or I have to remove something, and write "?" there, reload the file, and 
then ask for the type.

2. The same as 1, but for any marked region, when the region marks a term.

3. Pop-up "bubble" with type info when I hoover the mouse over the top 
constructor of a term. for an application, it could be the space between the 
terms.


What version of Agda are you using? On what operating system (if relevant)?
Agda-2.2.10, not OS dependent, I believe.

Original issue reported on code.google.com by david.wa...@gmail.com on 14 Nov 2011 at 1:56

@GoogleCodeExporter
Copy link
Author

For 1 you can always slap a lambda on your open terms to make them closed, or 
insert a goal as you mention. Although when inserting a goal you don't have to 
remove anything, just add {! around !} it and reload. That also takes care of 2.

We don't have the technology to map source code positions to type checking 
state at the moment and I'm not sure it's worth the machinery that would be 
required.

3 wouldn't be impossible I suppose, but it would mean adding huge amounts of 
data to the emacs highlighting files, so I'm not sure it's worth it.

Original comment by ulf.nor...@gmail.com on 16 Nov 2011 at 10:09

  • Changed state: Accepted
  • Added labels: Emacs, Priority-Low, Type-Enhancement

@GoogleCodeExporter GoogleCodeExporter added Priority-Low ux: emacs Issues relating to the Emacs agda2-mode type: enhancement Issues and pull requests about possible improvements labels Aug 8, 2015
@GoogleCodeExporter
Copy link
Author

Ok, I see. Yes, that trick solves it. But reloading takes time and typing 
effort (I am lazy and impatient ;-). I still think many users would appreciate 
automatic help about types of subterms.

Original comment by david.wa...@gmail.com on 16 Nov 2011 at 10:22

@m0davis
Copy link

m0davis commented Feb 29, 2016

+1. I'm reviewing some messy code I stopped working on two months ago and wish I had this enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Issues and pull requests about possible improvements ux: emacs Issues relating to the Emacs agda2-mode
Projects
None yet
Development

No branches or pull requests

4 participants