Type Error Slicing in Implicitly Typed, Higher-Order Languages

Previous methods have generally identified the location of a type error as a particular program point or the program subtree rooted at that point. We present an approach that identifies the location of a type error as a set of program points (a slice). On the one hand, type error slices contain enough program points to permit independent explanations of type errors (completeness). On the other hand, they contain only program points that are necessary for independent explanations (minimality). We discuss the advantages of complete and minimal type error slices over previous methods of presenting type errors. We describe algorithms for finding complete and minimal type error slices for implicitly typed higher-order languages like Standard ML.