Carlos Camar - Academia.edu (original) (raw)

Papers by Carlos Camar

Research paper thumbnail of A Solution to Haskell's Multi-Parameter Type Class Dilemma

Abstract. The introduction of multi-parameter type classes in Haskell has been hindered because o... more Abstract. The introduction of multi-parameter type classes in Haskell has been hindered because of problems associated to ambiguity, which occur due to the lack of type specialization during type inference. This paper proposes a minimalist, simple solution to ...

Research paper thumbnail of Types in Programming Languages

Studies about types have in uenced, in a signi cant way, the design and de nition of programming ... more Studies about types have in uenced, in a signi cant way, the design and de nition of programming languages. This survey presents an introductory overview of concepts related to types and type systems for modern programming languages. We introduce by ...

Research paper thumbnail of Overloading and Coherence

Research paper thumbnail of Modular and Extensible TypesLu

This paper presents a type declaration construct which provides either a type synonym, a datatype... more This paper presents a type declaration construct which provides either a type synonym, a datatype, an abstract type, an abstract type with views, a subtype of an existing type, or a module (collection of declarations) . It supports the denition of views for an abstract type, allowing pattern-matching on values of abstract types. The presentation of the proposed construct is based on several illustrative examples. The combination of separate constructs into a single one has lead to an exploration of subtyping, with the distinction between concrete subtyping and abstract subtyping . Concrete subtyping can be based on an explicit rule for each type constructor, as usual, or on overloading of type constructors. Abstract subtyping is based either on: i) restriction of the set of values of the parent type through the use of constructor functions, or extension of the functionality of the parent type by modifying or providing new transformer or reader functions, or ii) on concrete subtyping ...

Research paper thumbnail of ML Has Principal Typings

Is there a type system for core-ML that, using exactly the same syntax of types of the Damas-Miln... more Is there a type system for core-ML that, using exactly the same syntax of types of the Damas-Milner system, types exactly the same terms of this system, and has principal typings? In this article we answer this question affirmatively. A definition of principal typing is given, capturing the simple idea of representing the set of all typings that can be obtained in derivations for a given term in a given type system. This definition is parameterised on an ordering on types, enabling it to be used for different type systems. A type system for core-ML is presented that uses type expressions with the same form as the Damas-Milner system, and considers as well-typed the same expressions of the Damas-Milner system. A type inference algorithm is then presented, which computes principal typings with respect to the given type system.

Research paper thumbnail of Type inference for overloading

... BibTeX. @MISC{Camarao99typeinference, author = {Carlos Camarao and Lucilia Figueiredo and Bel... more ... BibTeX. @MISC{Camarao99typeinference, author = {Carlos Camarao and Lucilia Figueiredo and Belo Horizonte and Ouro Preto}, title = {Type ... It allows user-dened global and local overloading and supports overloading of functions dened over dierent type constructors. ...

Research paper thumbnail of A Solution to Haskell's Multi-Parameter Type Class Dilemma

Abstract. The introduction of multi-parameter type classes in Haskell has been hindered because o... more Abstract. The introduction of multi-parameter type classes in Haskell has been hindered because of problems associated to ambiguity, which occur due to the lack of type specialization during type inference. This paper proposes a minimalist, simple solution to ...

Research paper thumbnail of Types in Programming Languages

Studies about types have in uenced, in a signi cant way, the design and de nition of programming ... more Studies about types have in uenced, in a signi cant way, the design and de nition of programming languages. This survey presents an introductory overview of concepts related to types and type systems for modern programming languages. We introduce by ...

Research paper thumbnail of Overloading and Coherence

Research paper thumbnail of Modular and Extensible TypesLu

This paper presents a type declaration construct which provides either a type synonym, a datatype... more This paper presents a type declaration construct which provides either a type synonym, a datatype, an abstract type, an abstract type with views, a subtype of an existing type, or a module (collection of declarations) . It supports the denition of views for an abstract type, allowing pattern-matching on values of abstract types. The presentation of the proposed construct is based on several illustrative examples. The combination of separate constructs into a single one has lead to an exploration of subtyping, with the distinction between concrete subtyping and abstract subtyping . Concrete subtyping can be based on an explicit rule for each type constructor, as usual, or on overloading of type constructors. Abstract subtyping is based either on: i) restriction of the set of values of the parent type through the use of constructor functions, or extension of the functionality of the parent type by modifying or providing new transformer or reader functions, or ii) on concrete subtyping ...

Research paper thumbnail of ML Has Principal Typings

Is there a type system for core-ML that, using exactly the same syntax of types of the Damas-Miln... more Is there a type system for core-ML that, using exactly the same syntax of types of the Damas-Milner system, types exactly the same terms of this system, and has principal typings? In this article we answer this question affirmatively. A definition of principal typing is given, capturing the simple idea of representing the set of all typings that can be obtained in derivations for a given term in a given type system. This definition is parameterised on an ordering on types, enabling it to be used for different type systems. A type system for core-ML is presented that uses type expressions with the same form as the Damas-Milner system, and considers as well-typed the same expressions of the Damas-Milner system. A type inference algorithm is then presented, which computes principal typings with respect to the given type system.

Research paper thumbnail of Type inference for overloading

... BibTeX. @MISC{Camarao99typeinference, author = {Carlos Camarao and Lucilia Figueiredo and Bel... more ... BibTeX. @MISC{Camarao99typeinference, author = {Carlos Camarao and Lucilia Figueiredo and Belo Horizonte and Ouro Preto}, title = {Type ... It allows user-dened global and local overloading and supports overloading of functions dened over dierent type constructors. ...