#### DMCA

## Associated type synonyms (2005)

Venue: | In Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming |

Citations: | 93 - 22 self |

### Citations

608 | Rewrite Systems
- Klop
- 1992
(Show Context)
Citation Context ... its arguments. Moreover, we may permit repeated variable occurrences if the type checker terminates once it sees the same constraint twice in one reduction chain. Work on term rewriting system (TRS) =-=[19]-=- has identified many possible characterisations of systems that are guaranteed to be confluent and terminating, but the restrictions stated above seem to be a particularly good match for a functional ... |

277 | The Standard Template Library
- Stepanov, Lee
- 1995
(Show Context)
Citation Context ...abstraction Collects from Section 1 is an example of a generic data structure—others include sequences, graphs, and so on. Several very successful C++ libraries, such as the Standard Template Library =-=[29]-=- and the Boost Graph Library [28], provide highly-parameterised interfaces to these generic data structures, along with a wide range of implementations of these interfaces with different performance c... |

242 | Template meta-programming for haskell
- Sheard, Jones
- 2002
(Show Context)
Citation Context ... type functions compute function types The implementation of a string formatting function whose type depends on a format specifier seems a natural application for dependent types and meta programming =-=[26]-=-. Although Danvy [4] demonstrated that Standard ML’s type system is powerful enough to solve this problem, type functions enable a more direct solution [10], using an inductive definition instead of e... |

195 | A system of constructor classes: overloading and implicit higher-order polymorphism
- Jones
- 1995
(Show Context)
Citation Context ... Int 4. The Type System In this section, we formalise a type system for a lambda calculus including type classes with associated type synonyms. This type system is based on Jones’ Overloaded ML (OML) =-=[13, 14]-=- and is related to our earlier system for associated data types [1]. Like Haskell 98 [9, 7], our typing rules can be extended to give a typedirected translation of source programs into an explicitly-t... |

176 | Type classes with functional dependencies
- Jones
- 2000
(Show Context)
Citation Context ...Int c) = Elem c; . . .} Haskell aficionados will recognise that associated type synonyms attack exactly the same problem as functional dependencies, introduced to Haskell by Mark Jones five years ago =-=[15]-=-, and widely used since then in surprisingly varied ways, many involving typelevel computation. We discuss the relative strengths of the two approaches in detail in Section 6. It is too early to say w... |

144 |
The Boost Graph Library: User Guide and Reference Manual
- Siek, Lee, et al.
- 2002
(Show Context)
Citation Context ... 1 is an example of a generic data structure—others include sequences, graphs, and so on. Several very successful C++ libraries, such as the Standard Template Library [29] and the Boost Graph Library =-=[28]-=-, provide highly-parameterised interfaces to these generic data structures, along with a wide range of implementations of these interfaces with different performance characteristics. Recently, Garcia ... |

143 | Guarded recursive datatype constructors
- Xi, Chen, et al.
- 2003
(Show Context)
Citation Context ...c,Γc Θ | Γ ⊢ inst : Θi Θ | Γ ⊢ val : Γv ⊢ cls; inst ; val Figure 3: Typing rules for declarations Much of this is standard for extensions of the Hindley-Milner system with non-syntactic type equality =-=[24, 22, 21, 23, 32, 2]-=-. Novel in our system is the integration of entailment of type class predicates with type equalities. In particular, our system allows equality schemes, such as ∀a. Sprintf (I a) = Int → Sprintf a in ... |

135 | Type classes in Haskell
- Hall, Hammond, et al.
- 1996
(Show Context)
Citation Context ...luding type classes with associated type synonyms. This type system is based on Jones’ Overloaded ML (OML) [13, 14] and is related to our earlier system for associated data types [1]. Like Haskell 98 =-=[9, 7]-=-, our typing rules can be extended to give a typedirected translation of source programs into an explicitly-typed lambda calculus akin to the predicative fragment of System F. We omit these extended r... |

129 | Implementing type classes
- Peterson, Jones
- 1993
(Show Context)
Citation Context ...ample, if τ2 = τ3, then Tree (List τ2) = Tree (List τ3). 3 Rule (⇒I ), and the syntax of types, does not allow one to quantify over constraint schemes, an orthogonal and interesting possible extension=-=[11]-=-. Θ | Γ ⊢ e : σ (x : σ) ∈ Γ Θ | Γ ⊢ x : σ (var) Θ1 | Γ ⊢ e1 : σ1 Θ2 | Γ[x : σ1] ⊢ e2 : σ2 Θ1,Θ2 | Γ ⊢ let x = e1 in e2 : σ2 (let) Θ | Γ ⊢ e : τ1 Θsτ1 = τ2 Θ | Γ ⊢ e : τ2 (conv) Θ | Γ[x :τ1] ⊢ e2 : τ2 ... |

112 | First-class phantom types
- Cheney, Hinze
- 2003
(Show Context)
Citation Context ...alised abstract data types (GADTs), also known as guarded recursive data types and first-class phantom types, constrain the construction of data types by equality constraints in data type definitions =-=[32, 2, 16, 25]-=-. These constraints are available in the corresponding branches of case expressions, which enables typing expressions that would otherwise have been too specific. There appears to be a connection betw... |

102 | An extended comparative study of language support for generic programming
- Garcia, Jarvi, et al.
- 2007
(Show Context)
Citation Context ...de highly-parameterised interfaces to these generic data structures, along with a wide range of implementations of these interfaces with different performance characteristics. Recently, Garcia et al. =-=[8]-=- published a qualitative comparison of six programming 2 The infix operator f $ x in Haskell is function application f x at a lesser precedence. languages when used for this style of programming. In t... |

97 | A theory of qualified types
- Jones
- 1992
(Show Context)
Citation Context ...). • We present a type inference algorithm that can handle the nonsyntactic equalities arising from associated type synonyms; the algorithm conservatively extends Jones’ algorithm for qualified types =-=[12]-=- (Section 5). This paper is a natural development of, and is complementary to, our earlier work on associated data types [1], in which we allow a class declaration to define new algebraic data types. ... |

96 |
Type inference with constrained types. Theory and Practice of Object Systems
- Odersky, Sulzmann, et al.
- 1999
(Show Context)
Citation Context ...c,Γc Θ | Γ ⊢ inst : Θi Θ | Γ ⊢ val : Γv ⊢ cls; inst ; val Figure 3: Typing rules for declarations Much of this is standard for extensions of the Hindley-Milner system with non-syntactic type equality =-=[24, 22, 21, 23, 32, 2]-=-. Novel in our system is the integration of entailment of type class predicates with type equalities. In particular, our system allows equality schemes, such as ∀a. Sprintf (I a) = Int → Sprintf a in ... |

94 | Associated types with class
- Chakravarty, Keller, et al.
- 2005
(Show Context)
Citation Context ... the algorithm conservatively extends Jones’ algorithm for qualified types [12] (Section 5). This paper is a natural development of, and is complementary to, our earlier work on associated data types =-=[1]-=-, in which we allow a class declaration to define new algebraic data types. We discuss other related type systems—in particular, functional dependencies, HM(X), and ML modules—in detail in Sections 6 ... |

85 | A type system for higher-order modules
- Dreyer, Crary, et al.
- 2003
(Show Context)
Citation Context ...uring type inference. Moreover, GADTs are closed and not associated with type classes. ML modules. There is a significant overlap in functionality between Haskell type classes and Standard ML modules =-=[5]-=- . Associated types increase this overlap even more, and our equality constraints appear to bear a relation to sharing constraints. Nevertheless, there are also interesting differences, and both const... |

78 |
Traits: a new and useful template technique
- Myers
- 1995
(Show Context)
Citation Context ...referred over tuples of large arity. Associated types, just like records with named fields, refer to parameters by name and not by position. The same observation led to the addition of traits classes =-=[20]-=- in C++, which use a form of associated type synonyms in C++ classes. As discussed in Section 3.4, if a class with functional dependencies is used in the context of an instance declaration of a class ... |

72 | Strongly typed heterogeneous collections
- Kiselyov, Lämmel, et al.
- 2004
(Show Context)
Citation Context ...e code as if functional dependencies are normally used in a way that can be directly translated into associated types. In particular, even sophisticated uses of functional dependencies, such as HList =-=[18]-=- and a type safe evaluator, can be mirrored with associated types. Conversely, a direct encoding of associated types with functional dependencies is not possible with Jones’ and GHC’s system due to th... |

68 | Languages of the future
- Sheard
- 2004
(Show Context)
Citation Context ... it asserts that we will not extend the definition of Nat and Add in the future. Closed kind and type function definitions in a Haskell-like language have been proposed by Sheard for the Ωmega system =-=[25]-=-. Closed type functions are definitely useful—but so are open type functions! Indeed, open type functions are an extremely natural complement to the value-level open functions expressed by type classe... |

64 | A theory of overloading
- Stuckey, Sulzmann
- 2005
(Show Context)
Citation Context ...ese restrictions are not necessary if the semantics of the program is given by translation to an untyped intermediate language, or perhaps one with a richer type system than System F; see for example =-=[30]-=-.) Finally, to stay with Haskell’s tradition of rejecting unconditionally-ambiguous type signatures, in the sense of Section 3.4, we require two more constraints: • If σ ≡ (∀α.π ⇒ τ) is a method signa... |

55 | Simplifying and Improving Qualified Types
- Jones
- 1994
(Show Context)
Citation Context ... Int 4. The Type System In this section, we formalise a type system for a lambda calculus including type classes with associated type synonyms. This type system is based on Jones’ Overloaded ML (OML) =-=[13, 14]-=- and is related to our earlier system for associated data types [1]. Like Haskell 98 [9, 7], our typing rules can be extended to give a typedirected translation of source programs into an explicitly-t... |

50 | Functional Unparsing
- Danvy
- 1998
(Show Context)
Citation Context ...te function types The implementation of a string formatting function whose type depends on a format specifier seems a natural application for dependent types and meta programming [26]. Although Danvy =-=[4]-=- demonstrated that Standard ML’s type system is powerful enough to solve this problem, type functions enable a more direct solution [10], using an inductive definition instead of explicit continuation... |

50 | Wobbly types: type inference for generalised algebraic data types
- Jones, Washburn, et al.
- 2004
(Show Context)
Citation Context ...alised abstract data types (GADTs), also known as guarded recursive data types and first-class phantom types, constrain the construction of data types by equality constraints in data type definitions =-=[32, 2, 16, 25]-=-. These constraints are available in the corresponding branches of case expressions, which enables typing expressions that would otherwise have been too specific. There appears to be a connection betw... |

39 | Extending ML type system with a sorted equational theory. Research report 1766
- Remy
- 1992
(Show Context)
Citation Context ...c,Γc Θ | Γ ⊢ inst : Θi Θ | Γ ⊢ val : Γv ⊢ cls; inst ; val Figure 3: Typing rules for declarations Much of this is standard for extensions of the Hindley-Milner system with non-syntactic type equality =-=[24, 22, 21, 23, 32, 2]-=-. Novel in our system is the integration of entailment of type class predicates with type equalities. In particular, our system allows equality schemes, such as ∀a. Sprintf (I a) = Int → Sprintf a in ... |

33 | Sound and decidable type inference for functional dependencies
- Duck, Jones, et al.
(Show Context)
Citation Context ...ann’s system, based on an encoding into constraint handling rules, gains additional generality by giving up on a type-preserving translation and on separate compilation. As pointed out by Duck et al. =-=[6]-=-, GHC’s system is not decidable, as it permits recursive instance declarations that, for some programs that should be rejected, leads to non-termination of type inference. Jones original system is dec... |

29 | Essential Language Support for Generic Programming
- Siek, Lumsdaine
- 2005
(Show Context)
Citation Context ...+ does not have type inference. In exchange, C++ does not constrain the resulting type functions to be terminating or confluent, but permits arbitrary computations at compile time. Siek and Lumsdaine =-=[27]-=- recently proposed an interesting combination of Haskell-style type classes with the C++ approach to generic programming. They propose a language FG that adds a notion of concepts to System F and incl... |

25 | A static semantics for Haskell
- Faxén
(Show Context)
Citation Context ...luding type classes with associated type synonyms. This type system is based on Jones’ Overloaded ML (OML) [13, 14] and is related to our earlier system for associated data types [1]. Like Haskell 98 =-=[9, 7]-=-, our typing rules can be extended to give a typedirected translation of source programs into an explicitly-typed lambda calculus akin to the predicative fragment of System F. We omit these extended r... |

16 | Functional logic overloading
- Neubauer, Thiemann, et al.
- 2002
(Show Context)
Citation Context ...lem, type functions enable a more direct solution [10], using an inductive definition instead of explicit continuation passing style. The following implementation with associated synonyms is based on =-=[22]-=-. Format specifiers are realised as singleton types:2 data I f = I f -- Integer value data C f = C f -- Character value data S f = S String f -- Literal string formatSpec :: S (I (S (C String))) forma... |

8 |
Formatting: a class act
- Hinze
(Show Context)
Citation Context ...on for dependent types and meta programming [26]. Although Danvy [4] demonstrated that Standard ML’s type system is powerful enough to solve this problem, type functions enable a more direct solution =-=[10]-=-, using an inductive definition instead of explicit continuation passing style. The following implementation with associated synonyms is based on [22]. Format specifiers are realised as singleton type... |

6 | Type classes with more higher-order polymorphism
- Neubauer, Thiemann
- 2002
(Show Context)
Citation Context |

4 |
Joëlle Despeyroux. A simple applicative language: mini-ml
- Clément, Despeyroux, et al.
- 1986
(Show Context)
Citation Context ...his theorem, we followed Jones [12] who introduces a syntax-directed system as a bridge between the declarative typing rules and the algorithmic inference rules, as first suggested by Clément at al. =-=[3]-=-. The tricky bit is to define the inference rule for function elimination in the syntax-directed system such that a correspondence to the inference system can be established. We define the rule as fol... |

1 |
Functions with the variable number (of variously typed) arguments. http://okmij.org/ftp/Haskell/ vararg-fn.lhs
- Kiselyov
- 2004
(Show Context)
Citation Context ...le answer. Duck et al. [6, Example 4] use the following class head: class Zip a b c | a c → b, b c → a It is not immediately clear how to translate this to associated types. However, as Oleg Kiselyov =-=[17]-=- demonstrates, the simpler class header class Zip a b c | c → a b is sufficient for this and similar applications. This second declaration can also be readily captured as an associated type synonym. I... |