Anti-Unification with Type Classes

Nicolas Tabareau 1, 2 Éric Tanter 3 Ismael Figueroa 1, 3
1 ASCOLA - Aspect and composition languages
LINA - Laboratoire d'Informatique de Nantes Atlantique, Département informatique - EMN, Inria Rennes – Bretagne Atlantique
Abstract : The anti-unification problem is that of finding the most specific pattern of two terms. While dual to the unification problem, anti-unification has rarely been considered at the level of types. In this paper, we present an algorithm to compute the least general type of two types in Haskell, using the logic programming power of type classes. That is, we define a type class for which the type class instances resolution performs anti-unification. We then use this type class to define a type-safe embedding of aspects in Haskell.
Document type :
Conference papers
Liste complète des métadonnées

Cited literature [21 references]  Display  Hide  Download
Contributor : Nicolas Tabareau <>
Submitted on : Monday, December 17, 2012 - 9:44:03 AM
Last modification on : Wednesday, February 13, 2019 - 6:30:03 PM
Document(s) archivé(s) le : Sunday, December 18, 2016 - 2:51:41 AM


Files produced by the author(s)


  • HAL Id : hal-00765862, version 1


Nicolas Tabareau, Éric Tanter, Ismael Figueroa. Anti-Unification with Type Classes. Journées Francophones des Langages Applicatifs (JFLA), Feb 2013, Aussois, France. ⟨hal-00765862⟩



Record views


Files downloads