2006
DOI: 10.1007/11924661_3
|View full text |Cite
|
Sign up to set email alerts
|

Private Row Types: Abstracting the Unnamed

Abstract: In addition to traditional record and variant types, Objective Caml has structurally polymorphic types, for objects and polymorphic variants. These types allow new forms of polymorphic programming, but they have a limitation when used in combination with modules: there is no way to abstract their polymorphism in a signature. Private row types remedy to this situation: they are manifest types whose "row-variable" is left abstract, so that an implementation may instantiate it freely. They have useful application… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1

Citation Types

0
4
0

Year Published

2006
2006
2019
2019

Publication Types

Select...
3
3

Relationship

3
3

Authors

Journals

citations
Cited by 6 publications
(4 citation statements)
references
References 16 publications
0
4
0
Order By: Relevance
“…These are known as partially abstract types [6], and are available as a language feature in OCaml [13] and Moby [11]. However, implementing these via first-class subtypes allows more flexibility: for example, they allow some of the methods of an object type to be hidden from the exposed interface, and also support the dual of private types (called invisible types [16]), and zero cost-coercions [5], where coercions in both directions are available, but actual type equality is not exposed.…”
Section: Selective Abstractionmentioning
confidence: 99%
“…These are known as partially abstract types [6], and are available as a language feature in OCaml [13] and Moby [11]. However, implementing these via first-class subtypes allows more flexibility: for example, they allow some of the methods of an object type to be hidden from the exposed interface, and also support the dual of private types (called invisible types [16]), and zero cost-coercions [5], where coercions in both directions are available, but actual type equality is not exposed.…”
Section: Selective Abstractionmentioning
confidence: 99%
“…OCaml's structurally typed polymorphic variants are distinguished by a leading backtick ' for each constructor: for instance, 'Unknown_file s has the type The revised Store signature exposes a type error, consisting of general errors expected to be encountered by any Store implementation, along with a pretty printer [Bonichon and Weis 2017] that builds a humanreadable representation of an error (Line 3). By making the error type private [Garrigue 2006], we allow the implementation to provide a richer error type, as long as it contains at least the specified elements. Module type signatures with functions that may return an error use the result type to return either the result of a successful call or the relevant error information.…”
Section: Reporting Errorsmentioning
confidence: 99%
“…Despite such abundant literature and practical implementations, however, the number of examples of using recursive modules reported in the literature is still rather limited: expression/binding recursive modules [6], Okasaki's bootstrapped heaps [31], polymorphic recursion [21], tree/forest recursive data structures [28], and the expression problem [13]. While they give us some idea of how recursive modules can be useful in practice, their scarcity may also demonstrate that existing systems are either too cumbersome or not expressive enough to accommodate other interesting examples.…”
Section: Introductionmentioning
confidence: 99%