GADT meet Subtyping [article]

Gabriel Scherer, Didier Rémy (INRIA Rocquencourt)
<span title="2012-10-22">2012</span> <i > arXiv </i> &nbsp; <span class="release-stage" >pre-print</span>
While generalized abstract datatypes (GADT) are now considered well-understood, adding them to a language with a notion of subtyping comes with a few surprises. What does it mean for a GADT parameter to be covariant? The answer turns out to be quite subtle. It involves fine-grained properties of the subtyping relation that raise interesting design questions. We allow variance annotations in GADT definitions, study their soundness, and present a sound and complete algorithm to check them. Our
more &raquo; ... k may be applied to real-world ML-like languages with explicit subtyping such as OCaml, or to languages with general subtyping constraints.
<span class="external-identifiers"> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1210.5935v1">arXiv:1210.5935v1</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/wpma65kdgfbtbcfmdawygmpfb4">fatcat:wpma65kdgfbtbcfmdawygmpfb4</a> </span>
<a target="_blank" rel="noopener" href="https://archive.org/download/arxiv-1210.5935/1210.5935.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> File Archive [PDF] </button> </a> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1210.5935v1" title="arxiv.org access"> <button class="ui compact blue labeled icon button serp-button"> <i class="file alternate outline icon"></i> arxiv.org </button> </a>