<?xml version="1.0" encoding="utf-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hal="http://hal.archives-ouvertes.fr/" xmlns:gml="http://www.opengis.net/gml/3.3/" xmlns:gmlce="http://www.opengis.net/gml/3.3/ce" version="1.1" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 http://api.archives-ouvertes.fr/documents/aofr-sword.xsd">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>HAL TEI export of hal-00914493v1</title>
      </titleStmt>
      <publicationStmt>
        <distributor>CCSD</distributor>
        <availability status="restricted">
          <licence target="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 - Universal</licence>
        </availability>
        <date when="2026-05-25T05:20:20+02:00"/>
      </publicationStmt>
      <sourceDesc>
        <p part="N">HAL API Platform</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <listBibl>
        <biblFull>
          <titleStmt>
            <title xml:lang="en">Ambivalent Types for Principal Type Inference with GADTs (extended version)</title>
            <author role="aut">
              <persName>
                <forename type="first">Jacques</forename>
                <surname>Garrigue</surname>
              </persName>
              <idno type="halauthorid">784078-0</idno>
              <orgName ref="#struct-472208"/>
              <affiliation ref="#struct-83609"/>
            </author>
            <author role="aut">
              <persName>
                <forename type="first">Didier</forename>
                <surname>Rémy</surname>
              </persName>
              <email type="md5">a326c193a18973f33e31b4126942d185</email>
              <email type="domain">inria.fr</email>
              <idno type="idhal" notation="string">didier-remy</idno>
              <idno type="idhal" notation="numeric">1315720</idno>
              <idno type="halauthorid" notation="string">602946-1315720</idno>
              <idno type="ORCID">https://orcid.org/0000-0002-0693-6278</idno>
              <idno type="IDREF">https://www.idref.fr/080653553</idno>
              <affiliation ref="#struct-454410"/>
            </author>
            <editor role="depositor">
              <persName>
                <forename>Didier</forename>
                <surname>Rémy</surname>
              </persName>
              <email type="md5">a326c193a18973f33e31b4126942d185</email>
              <email type="domain">inria.fr</email>
            </editor>
          </titleStmt>
          <editionStmt>
            <edition n="v1" type="current">
              <date type="whenSubmitted">2013-12-06 16:27:23</date>
              <date type="whenWritten">2013-12</date>
              <date type="whenModified">2026-04-28 17:02:07</date>
              <date type="whenReleased">2013-12-06 22:01:00</date>
              <date type="whenProduced">2013-12</date>
              <date type="whenEndEmbargoed">2013-12-06</date>
              <ref type="file" target="https://inria.hal.science/hal-00914493v1/document">
                <date notBefore="2013-12-06"/>
              </ref>
              <ref type="file" subtype="author" n="1" target="https://inria.hal.science/hal-00914493v1/file/Garrigue-Remy_gadts_long2013.pdf" id="file-914493-135875">
                <date notBefore="2013-12-06"/>
              </ref>
            </edition>
            <edition n="v2">
              <date type="whenSubmitted">2013-12-10 22:02:41</date>
            </edition>
            <respStmt>
              <resp>contributor</resp>
              <name key="102237">
                <persName>
                  <forename>Didier</forename>
                  <surname>Rémy</surname>
                </persName>
                <email type="md5">a326c193a18973f33e31b4126942d185</email>
                <email type="domain">inria.fr</email>
              </name>
            </respStmt>
          </editionStmt>
          <publicationStmt>
            <distributor>CCSD</distributor>
            <idno type="halId">hal-00914493</idno>
            <idno type="halUri">https://inria.hal.science/hal-00914493</idno>
            <idno type="halBibtex">garrigue:hal-00914493</idno>
            <idno type="halRefHtml">2013</idno>
            <idno type="halRef">2013</idno>
            <availability status="restricted">
              <licence target="https://about.hal.science/hal-authorisation-v1/">HAL Authorization<ref corresp="#file-914493-135875"/></licence>
            </availability>
          </publicationStmt>
          <seriesStmt/>
          <notesStmt>
            <note type="audience" n="1">Not set</note>
          </notesStmt>
          <sourceDesc>
            <biblStruct>
              <analytic>
                <title xml:lang="en">Ambivalent Types for Principal Type Inference with GADTs (extended version)</title>
                <author role="aut">
                  <persName>
                    <forename type="first">Jacques</forename>
                    <surname>Garrigue</surname>
                  </persName>
                  <idno type="halauthorid">784078-0</idno>
                  <orgName ref="#struct-472208"/>
                  <affiliation ref="#struct-83609"/>
                </author>
                <author role="aut">
                  <persName>
                    <forename type="first">Didier</forename>
                    <surname>Rémy</surname>
                  </persName>
                  <email type="md5">a326c193a18973f33e31b4126942d185</email>
                  <email type="domain">inria.fr</email>
                  <idno type="idhal" notation="string">didier-remy</idno>
                  <idno type="idhal" notation="numeric">1315720</idno>
                  <idno type="halauthorid" notation="string">602946-1315720</idno>
                  <idno type="ORCID">https://orcid.org/0000-0002-0693-6278</idno>
                  <idno type="IDREF">https://www.idref.fr/080653553</idno>
                  <affiliation ref="#struct-454410"/>
                </author>
              </analytic>
              <monogr>
                <imprint/>
              </monogr>
              <ref target="http://cristal.inria.fr/~remy/gadts/" type="seeAlso"/>
            </biblStruct>
          </sourceDesc>
          <profileDesc>
            <langUsage>
              <language ident="en">English</language>
            </langUsage>
            <textClass>
              <keywords scheme="author">
                <term xml:lang="en">GADT Type Inference Principal Types Ambivalent Types</term>
              </keywords>
              <classCode scheme="acm" n="F.3.3.4">F.: Theory of Computation/F.3: LOGICS AND MEANINGS OF PROGRAMS/F.3.3: Studies of Program Constructs/F.3.3.4: Type structure</classCode>
              <classCode scheme="halDomain" n="info.info-pl">Computer Science [cs]/Programming Languages [cs.PL]</classCode>
              <classCode scheme="halTypology" n="UNDEFINED">Preprints, Working Papers, ...</classCode>
              <classCode scheme="halOldTypology" n="UNDEFINED">Preprints, Working Papers, ...</classCode>
              <classCode scheme="halTreeTypology" n="UNDEFINED">Preprints, Working Papers, ...</classCode>
            </textClass>
            <abstract xml:lang="en">
              <p>GADTs, short for Generalized Algebraic DataTypes, which allow constructors of algebraic datatypes to be non-surjective, have many useful applications. However, pattern matching on GADTsintroduces local type equality assumptions, which are a source of ambiguities that may destroy principal types---and must be resolved by type annotations. We introduce ambivalent types to tighten the definition of ambiguities and better confine them, so that type inference has principal types, remains monotonic, and requires fewer type annotations.</p>
            </abstract>
          </profileDesc>
        </biblFull>
      </listBibl>
    </body>
    <back>
      <listOrg type="structures">
        <org type="laboratory" xml:id="struct-83609" status="VALID">
          <orgName>Graduate School of Mathematics [Nagoya]</orgName>
          <desc>
            <address>
              <country key="JP"/>
            </address>
            <ref type="url">http://www.math.nagoya-u.ac.jp</ref>
          </desc>
          <listRelation>
            <relation active="#struct-472208" type="direct"/>
          </listRelation>
        </org>
        <org type="researchteam" xml:id="struct-454410" status="OLD">
          <idno type="RNSR">200618331D</idno>
          <orgName>Programming languages, types, compilation and proofs</orgName>
          <orgName type="acronym">GALLIUM</orgName>
          <date type="start">2006-05-01</date>
          <date type="end">2016-04-30</date>
          <desc>
            <address>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.inria.fr/equipes/gallium</ref>
          </desc>
          <listRelation>
            <relation active="#struct-86790" type="direct"/>
            <relation active="#struct-300009" type="indirect"/>
          </listRelation>
        </org>
        <org type="institution" xml:id="struct-472208" status="VALID">
          <idno type="ISNI">000000010943978X</idno>
          <idno type="ROR">https://ror.org/04chrp450</idno>
          <orgName>Nagoya University</orgName>
          <desc>
            <address>
              <addrLine>Furo-cho, Chikusa-ku, Nagoya, 464-8601, Japan</addrLine>
              <country key="JP"/>
            </address>
            <ref type="url">http://en.nagoya-u.ac.jp</ref>
          </desc>
        </org>
        <org type="laboratory" xml:id="struct-86790" status="OLD">
          <orgName>Inria Paris-Rocquencourt</orgName>
          <date type="end">2016-03-30</date>
          <desc>
            <address>
              <addrLine>INRIA Rocquencourt : Domaine de Voluceau, Rocquencourt B.P. 105 78153 le Chesnay Cedex</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.inria.fr/centre/paris-rocquencourt</ref>
          </desc>
          <listRelation>
            <relation active="#struct-300009" type="direct"/>
          </listRelation>
        </org>
        <org type="institution" xml:id="struct-300009" status="VALID">
          <idno type="ROR">https://ror.org/02kvxyf05</idno>
          <orgName>Institut National de Recherche en Informatique et en Automatique</orgName>
          <orgName type="acronym">Inria</orgName>
          <desc>
            <address>
              <addrLine>Domaine de VoluceauRocquencourt - BP 10578153 Le Chesnay Cedex</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.inria.fr/en/</ref>
          </desc>
        </org>
      </listOrg>
    </back>
  </text>
</TEI>