Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004369OCamlOCaml generalpublic2007-08-26 12:532016-04-19 14:11
ReporterBoris Yakobowski 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version3.10.0 
Target Version4.03.1+devFixed in Version 
Summary0004369: The emacs function "Show types at point" does not show the type of methods
Description(Almost) everything is in the title: one gets "Point is not within a typechecked expression or pattern" when trying to get the type of a method.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005812acknowledged Adapt emacs mode to generate .annot from .cmt files 

-  Notes
(0008073)
doligez (administrator)
2012-09-15 00:17

We just need to adapt caml-types.el to the new -bin-annot way of doing things, and the problem will disappear by magic.
(0015801)
gasche (developer)
2016-04-18 23:14

I would warmly recommend using Merlin to anyone interested in accurate type information for an incomplete Emacs buffer.

  https://github.com/the-lambda-church/merlin/ [^]
(0015804)
Boris Yakobowski (reporter)
2016-04-19 00:00

I agree completely, and I switched to Merlin a long time ago. But this issue is not Merlin's best selling point: querying the type of a method highlights the method properly, but shows the type of the entire method _prefixed by the type of the class_. The result is nearly unreadable when the class is big.

(Still, there must have been progress on this recently. I distinctly remember trying this a few months back, and it was not working at all.)
(0015805)
nojebar (reporter)
2016-04-19 11:40

Even though merlin is great, it is not lightweight and it has many dependencies which make it not to easy to use in Windows and other less usual situations. So I think there still is a need for a light tool like caml-types.el for those of us who cannot readily make the jump to merlin.
(0015806)
gasche (developer)
2016-04-19 12:42

Yep but, judging by the history of this PR, "those of us" will have to submit patches.
(0015807)
nojebar (reporter)
2016-04-19 12:51

I am actually interested in helping update caml-types.el to use cmt files. The only issue is one of methodology: do we read the information from cmt file each time we want to look up a type (guided by the location) or do we try to produce a textual, annot-like, representation of the whole file once and then cache that on the emacs side for performance?

I have a proof of concept of the first strategy and is quite usable, but slightly slower (at least on Windows) than the current caml-types.el which caches the whole .annot file after reading.

Implementing the second strategy may be as easy as capturing the output of tools/read_cmt in lieu of reading the .annot file.

Any opinions ?
(0015808)
gasche (developer)
2016-04-19 14:00

Out of curiosity, how is the deserialization of .cmt information implemented?
(0015809)
nojebar (reporter)
2016-04-19 14:04

It is done with a little tool written in OCaml. As far as I can see this is the only option if we do not want to write a general Marshal decoder in elisp...
(0015811)
gasche (developer)
2016-04-19 14:11

I don't have a particular opinion on your question. I would recommend proposing things for integration even if they are not optimal for performance. Visible change is the best way to get steam, and support from others.

- Issue History
Date Modified Username Field Change
2007-08-26 12:53 Boris Yakobowski New Issue
2007-11-06 15:46 doligez Status new => assigned
2007-11-06 15:46 doligez Assigned To => doligez
2012-07-11 16:04 doligez Target Version => 4.01.0+dev
2012-07-31 13:37 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-15 00:17 doligez Note Added: 0008073
2012-09-15 00:17 doligez Assigned To doligez =>
2012-09-15 00:17 doligez Status assigned => confirmed
2012-09-15 00:17 doligez Target Version 4.00.1+dev => 4.01.0+dev
2013-07-29 15:25 doligez Target Version 4.01.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-31 13:51 doligez Relationship added related to 0005812
2014-08-18 15:17 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 16:45 doligez Target Version undecided => 4.02.2+dev / +rc1
2015-02-24 23:14 doligez Target Version 4.02.2+dev / +rc1 => 4.03.0+dev / +beta1
2016-04-18 23:14 gasche Target Version 4.03.0+dev / +beta1 => 4.03.1+dev
2016-04-18 23:14 gasche Note Added: 0015801
2016-04-19 00:00 Boris Yakobowski Note Added: 0015804
2016-04-19 11:40 nojebar Note Added: 0015805
2016-04-19 12:42 gasche Note Added: 0015806
2016-04-19 12:51 nojebar Note Added: 0015807
2016-04-19 14:00 gasche Note Added: 0015808
2016-04-19 14:04 nojebar Note Added: 0015809
2016-04-19 14:11 gasche Note Added: 0015811


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker