Peter, I'm copying this to the Poly/ML list as you suggested.
It would be nice to have SML emacs mode working with Poly/ML for those who would like to use it but my feeling is that it is rather old-fashioned. Poly/ML now supports a much more extensive interface designed for an IDE. The best example of this is Isabelle's ML mode. See http://sketis.net/2014/isabellepide-as-ide-for-standard-ml which has a nice screen-shot. Lucas Dixon and I both had a go at producing IDEs which were completely independent of Isabelle but we didn't get as far as Makarius has.
It all works by having the Poly/ML compiler as a function which takes a large set of parameters most of which have simple defaults. All the interaction with the compiler is through ML functions. The default REPL just calls the compiler with streams connected to the console but it's very easy for a user to replace the REPL with something else. The Isabelle IDE is just using the Poly/ML compiler function but passing in parameters which capture error messages and also allow browsing of the parse-tree to get information about the types. So far the debugger hasn't been fully integrated with this but it's something I have in mind.
The format that the default REPL uses for error messages was one that was used by various compilers at one time and it used to be possible to parse it automatically. If there's a more up-to-date format I'm happy to change to it. I don't know if anyone is parsing the current format automatically and would be inconvenienced by a change.
David
On 03/12/2014 03:26, Peter Gammie wrote:
Dave,
I?ve been talking to Stefan about the SML mode for emacs that he maintains. I?m hoping to use it with Poly/ML and it is starting to come together.
Stefan observed that it would be super-helpful if Poly/ML generated errors in a standard format, such as e.g. the one that GCC or clang use, as far as that makes sense.
Would you be open to that? I could try to crank out some patches to Poly/ML if so.
BTW I am wondering how people interact with Poly/ML?s repl. With more hacking it is likely to be somewhat emacs-friendly, but I?m still struggling to understand how people have done it in the past.
For instance, I presently more-or-less just load all modules into poly with a series of ?use?s in dependency order. Now I?d like to use the debugger and it seems I have to hack all this scaffolding to do so. From the looks of it Isabelle does the same.
Feel free to reply via the Poly/ML list if you prefer.
Thanks for the awesome system. I hope I can make some use of the concurrency!
thanks, peter