Type Inference for Multi-Parameter Type Classes
by
Martin Sulzmann
,
Peter J. Stuckey
BibTeX
@MISC{Sulzmann_typeinference,
author = {Martin Sulzmann and Peter J. Stuckey},
title = {Type Inference for Multi-Parameter Type Classes},
year = {}
}
OpenURL
Abstract
We observe that the combination of multi-parameter type classes with existential types and type annotations leads to a loss of principal types. As a consequence type inference in implementations such as GHC is incomplete. This may be a surprising fact for users of these standard features. We conduct a concise investigation of the problem and are able to precisely explain why we lose principality and completeness of inference. As remedy we propose several novel inference methods to retain completeness and principality.







