'SML# + annot' is a patch and Emacs lisp for SML# compiler to show a type of an expression.
Downlad SML# compiler and install dependencies library. See http://www.pllab.riec.tohoku.ac.jp/smlsharp/.
Download a proper version patch from https://github.com/mzp/smlsharp-annot/tree/master/patches.(if you use 1.0.3, download 'PATCH-1.0.3'.)
$ tar xvzf smlsharp-xxx.tar.gz $ cd smlsharp-xxx $ patch -p2 < path/to/patches/PATCH-xxx
$ configure # with some options $ make minismlsharp $ make depend $ make # and wait for a long time $ make install
Before this, install sml-mode(http://www.iro.umontreal.ca/~monnier/elisp/)
Download https://github.com/mzp/smlsharp-annot/blob/master/elisp/smlsharp.el and put
And add following lines to
(require 'sml-mode) (require 'smlsharp) (define-key sml-mode-map "\C-ct" #'smlsharp-query-type)
Compile a file with annot option.
$ smlsharp -d annot=yes fact.ml
Copyright 2012- MIZUNO Hiroki(mzp)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.