Results 1  10
of
25
Type classes in Haskell
 ACM Transactions on Programming Languages and Systems
, 1996
"... This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the HindleyMilner inference rules. In contrast to other work on type classes, the rules presented here relate directl ..."
Abstract

Cited by 124 (5 self)
 Add to MetaCart
This paper de nes a set of type inference rules for resolving overloading introduced by type classes. Programs including type classes are transformed into ones which may be typed by the HindleyMilner inference rules. In contrast to other work on type classes, the rules presented here relate directly to user programs. An innovative aspect of this work is the use of secondorder lambda calculus to record type information in the program. 1.
Type Classes and Overloading in HigherOrder Logic
 Theorem Proving in Higher Order Logics: TPHOLs ’97, LNCS 1275
, 1997
"... Type classes and overloading are shown to be independent concepts that can both be added to simple higherorder logics in the tradition of Church and Gordon, without demanding more logical expressiveness. In particular, modeltheoretic issues are not affected. Our metalogical results may serve as a ..."
Abstract

Cited by 71 (7 self)
 Add to MetaCart
Type classes and overloading are shown to be independent concepts that can both be added to simple higherorder logics in the tradition of Church and Gordon, without demanding more logical expressiveness. In particular, modeltheoretic issues are not affected. Our metalogical results may serve as a foundation of systems like Isabelle/Pure that offer the user Haskellstyle ordersorted polymorphism as an extended syntactic feature. The latter can be used to describe simple abstract theories with a single carrier type and a fixed signature of operations.
Explaining Type Inference
 Science of Computer Programming
, 1995
"... Type inference is the compiletime process of reconstructing missing type information in a program based on the usage of its variables. ML and Haskell are two languages where this aspect of compilation has enjoyed some popularity, allowing type information to be omitted while static type checking is ..."
Abstract

Cited by 53 (0 self)
 Add to MetaCart
Type inference is the compiletime process of reconstructing missing type information in a program based on the usage of its variables. ML and Haskell are two languages where this aspect of compilation has enjoyed some popularity, allowing type information to be omitted while static type checking is still performed. Type inference may be expected to have some application in the prototyping and scripting languages which are becoming increasingly popular. A difficulty with type inference is the confusing and sometimes counterintuitive diagnostics produced by the type checker as a result of type errors. A modification of the HindleyMilner type inference algorithm is presented, which allows the specific reasoning which led to a program variable having a particular type to be recorded for type explanation. This approach is close to the intuitive process used in practice for debugging type errors. 1 Introduction Type inference refers to the compiletime process of reconstructing missing t...
Type inference with constrained types
 Fourth International Workshop on Foundations of ObjectOriented Programming (FOOL)
, 1997
"... We present a general framework HM(X) for type systems with constraints. The framework stays in the tradition of the Hindley/Milner type system. Its type system instances are sound under a standard untyped compositional semantics. We can give a generic type inference algorithm for HM(X) so that, unde ..."
Abstract

Cited by 46 (5 self)
 Add to MetaCart
We present a general framework HM(X) for type systems with constraints. The framework stays in the tradition of the Hindley/Milner type system. Its type system instances are sound under a standard untyped compositional semantics. We can give a generic type inference algorithm for HM(X) so that, under sufficient conditions on X, type inference will always compute the principal type of a term. We discuss instances of the framework that deal with polymorphic records, equational theories and subtypes.
Explicit Graphs in a Functional Model for Spatial Databases
 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING
, 1994
"... Observing that networks are ubiquitous in applications for spatial databases, we define a new data model and query language that especially supports graph structures. This model integrates concepts of functional data modeling with ordersorted algebra. Besides object and data type hierarchies grap ..."
Abstract

Cited by 28 (9 self)
 Add to MetaCart
Observing that networks are ubiquitous in applications for spatial databases, we define a new data model and query language that especially supports graph structures. This model integrates concepts of functional data modeling with ordersorted algebra. Besides object and data type hierarchies graphs are available as an explicit modeling tool, and graph operations are part of the query language. Graphs have three classes of components, namely nodes, edges, and explicit paths. These are at the same time object types within the object type hierarchy and can be used like any other type. Explicit paths are useful because “real world ” objects often correspond to paths in a network. Furthermore, a dynamic generalization concept is introduced to handle heterogeneous collections of objects in a query. In connection with spatial data types this leads to powerful modeling and querying capabilities for spatial databases, in particular for spatially embedded networks such as highways, rivers, public transport, and so forth. We use multilevel ordersorted algebra as a formal framework for the specification of our model. Roughly spoken, the first level algebra defines types and operations of the query language whereas the second level algebra defines kinds (collections of types) and type constructors as functions between kinds and so provides the types that can be used at the first level.
HOLCF: Higher Order Logic of Computable Functions
 In Theorem Proving in Higher Order Logics, volume 971 of LNCS
, 1995
"... . This paper presents a survey of HOLCF, a higher order logic of computable functions. The logic HOLCF is based on HOLC, a variant of the well known higher order logic HOL, which offers the additional concept of type classes. HOLCF extends HOLC with concepts of domain theory such as complete pa ..."
Abstract

Cited by 24 (0 self)
 Add to MetaCart
. This paper presents a survey of HOLCF, a higher order logic of computable functions. The logic HOLCF is based on HOLC, a variant of the well known higher order logic HOL, which offers the additional concept of type classes. HOLCF extends HOLC with concepts of domain theory such as complete partial orders, continuous functions and a fixed point operator. With the help of type classes the extension can be formulated in a way such that the logic LCF constitutes a proper sublanguage of HOLCF. Therefore techniques from higher order logic and LCF can be combined in a fruitful manner avoiding drawbacks of both logics. The development of HOLCF was entirely conducted within the Isabelle system. 1 Introduction This paper presents a survey of HOLCF, a higher order logic of computable functions. The logic HOLCF is based on HOLC, a variant of the well known higher order logic HOL [GM93], which offers the additional concept of type classes. HOLCF extends HOLC with concepts of domain t...
Type Reconstruction for Type Classes
, 1995
"... We study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of MLstyle polymorphism with overloading. We generalize Milner's work on polymorphism byintroducing a separate context constraining the type variables ..."
Abstract

Cited by 23 (8 self)
 Add to MetaCart
We study the type inference problem for a system with type classes as in the functional programming language Haskell. Type classes are an extension of MLstyle polymorphism with overloading. We generalize Milner's work on polymorphism byintroducing a separate context constraining the type variables in a typing judgement. This leads to simple type inference systems and algorithms which closely resemble those for ML. In particular we present a new unification algorithm which is an extension of syntactic unification with constraint solving. The existence of principal types follows from an analysis of this unification algorithm.
The Logical Framework of SPECTRUM
"... The SPECTRUM project concentrates on the process of developing wellstructured, precise system specifications. Spectrum is a specification language, with a deduction calculus and a development methodology. An informal presentation of the SPECTRUM language with many examples illustrating its prope ..."
Abstract

Cited by 15 (6 self)
 Add to MetaCart
The SPECTRUM project concentrates on the process of developing wellstructured, precise system specifications. Spectrum is a specification language, with a deduction calculus and a development methodology. An informal presentation of the SPECTRUM language with many examples illustrating its properties is given in [BFG+93a, BFG+93b]. The purpose of this article is to describe its formal semantics.
Functional logic overloading
, 2002
"... Functional logic overloading is a novel approach to userdefined overloading that extends Haskell’s concept of type classes in significant ways. Whereas type classes are conceptually predicates on types in standard Haskell, they are type functions in our approach. Thus, we can base type inference on ..."
Abstract

Cited by 15 (1 self)
 Add to MetaCart
Functional logic overloading is a novel approach to userdefined overloading that extends Haskell’s concept of type classes in significant ways. Whereas type classes are conceptually predicates on types in standard Haskell, they are type functions in our approach. Thus, we can base type inference on the evaluation of functional logic programs. Functional logic programming provides a solid theoretical foundation for type functions and, at the same time, allows for programmable overloading resolution strategies by choosing different evaluation strategies for functional logic programs. Type inference with type functions is an instance of type inference with constrained types, where the underlying constraint system is defined by a functional logic program. We have designed a variant of Haskell which supports our approach to overloading, and implemented a prototype frontend for the language.