ComputingComputer ScienceAlgorithmsProgramming LanguagesSyntaxConstraint SatisfactionData TypesSyntactic AnalysisType CheckingType ClassificationType SystemsConstraintsData Type InferenceDatatypes TheoryParametric PolymorphismPolymorphic Type SystemsPolymorphic TypesType ConstraintsType Inference
Record calculi use labels to distinguish between the elements of products and sums. This paper presents a novel variation, type-indexed rows, in which labels are discarded and elements are indexed by their type alone. The calculus, λTIR, can express tuples, recursive datatypes, monomorphic records, polymorphic extensible records, and closed-world style type-based overloading. Our motivating application of λTIR, however, is to encode the "choice" types of XML, and the "unordered tuple" types of SGML. Indeed, λTIR is the kernel of the language XMλ, a lazy functional language with direct support for XML types ("DTDs") and terms ("documents").The system is built from rows, equality constraints, insertion constraints and constrained, or qualified, parametric polymorphism. The test for constraint satisfaction is complete, and for constraint entailment is only mildly incomplete. We present a type checking algorithm, and show how λTIR may be implemented by a type-directed translation which replaces type-indexing by conventional natural-number indexing. Though not presented in this paper, we have also developed a constraint simplification algorithm and type inference system.
22
Tim Bray, Jean Paoli, C. M. Sperberg‐McQueen · World Wide Web · 1997 · 1.7K citations
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Type inclusion constraints and type inference
Alex Aiken, Edward L. Wimmers · 1993 · 260 citations
Complete Type Inference for Simple Objects
Mitchell Wand · Logic in Computer Science · 1987 · 211 citations