[MLton-user] mlton and emacs flymake mode

Michael Norrish Michael.Norrish at nicta.com.au
Thu Nov 11 14:52:12 PST 2010


On 12/11/10 01:07, Matthew Fluet wrote:
> On Mon, Nov 8, 2010 at 11:28 PM, Michael Norrish
> <Michael.Norrish at nicta.com.au>  wrote:
>> Has anyone tried using mlton as a syntax-checker for emacs' flymake mode?
>>   My experience with mlton is that it does syntax and type-checking pretty
>> quickly, so it doesn't seem completely out of the question that it might be
>> usable in this mode.
>>
>> I don't know how often flymake calls its checkers, but I'd hope it would be
>> configurable so that even a slow mlton-check would be something it could
>> slot in.
>
> I haven't tried the flymake mode.  I looked at the flymake webpage
> briefly --- one thing to bear in mind is that it sounds like it makes
> a temporary copy of the current buffer and passes that off to the
> syntax checker.  As a syntax checker, MLton will do fine with an
> isolated file, but you will probably need to weed out the
> type-checking errors.  This would be especially true in a large
> project organized with .sml files; most isolated .sml files won't type
> check.  It might not be terribly difficult to add a "-stop sc"
> (syntax-check) option to only scan/parse and not type check.

My fractionally deeper reading of the webpage made it sound as if there is a notion of "master" file that can be used as the compile target.  A mlton project's mlb file would obviously be such a file, so it may be possible to get type-checking too.

I may give it all a go in my Copious Free Time.

Michael.



More information about the MLton-user mailing list