Skalpel: A Type Error Slicer for SML
The Standard ML
language has a sophisticated type system, and unfortunately
type error messages produced by previously available tools (such
as most of the SML implementations
e.g. SML/NJ) are
confusing and misleading and cost significant programmer time to
correct. These messages are confusing because they often:
Identify error locations that might be far from the real
Exhibit purported parts of the program which are actually
significantly transformed from the real source code, and
Exhibit types which the programmer does not recognise because
they mention internal unification variables or do not match the
Our type error slicer, Skalpel, reports error messages that have none of
the above issues. Instead, Skalpel:
Identifies all of the program points that contribute to a
type error (including the spot with the actual programming error
that caused the type error),
Highlights these program points in the original, unchanged
source code, and
Avoids showing internal details of the operation of the type inference
If you would like to try Skalpel before you download it, you can experiment with the
latest version by
clicking here. If
you do like it (or don't!), then please let us know by using our mailing list.
Below are the error messages output from both Skalpel using the Emacs interface (using Emacs v22.3.1) and SML/NJ (v110.70) when run on a small ill-typed SML
Skalpel highlights all the locations involved
in the reported type error. Any of the pieces of code at these
locations can be changed to solve this particular type error.
If we assume that the programming error is
weight x was supposed to be
weight * x, note that
the region reported by SML/NJ (v110.70) does
not include the location of the programming error, which can be
The menu on the left will help you navigate through our website.
Demo to access to the online demo of Skalpel.
There, you will be able to type check your own programs and
obtain informative slices in case of ill-typed programs.
Syntax to see which subset of SML is currently implemented
to access an online demo of Skalpel
to learn about the main concepts of Skalpel.
to download the latest version of Skalpel.
to access the user guide containing details on how to use Skalpel.
provides information on the people involved in this project.
If you encounter any problem with this web site our with Skalpel, please feel free
Web page validation