Results 1  10
of
33
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 135 (7 self)
 Add to MetaCart
(Show Context)
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 78 (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 60 (0 self)
 Add to MetaCart
(Show Context)
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 57 (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.
Haskell overloading is dexptimecomplete
 Information Processing Letters
, 1994
"... ..."
(Show Context)
Code generation via higherorder rewrite systems
 In Functional and Logic Programming, 10th International Symposium: FLOPS 2010, volume 6009 of Lecture Notes in Computer Science
, 2010
"... Abstract. We present the metatheory behind the code generation facilities of Isabelle/HOL. To bridge the gap between the source (higherorder logic with type classes) and the many possible targets (functional programming languages), we introduce an intermediate language, MiniHaskell. To relate th ..."
Abstract

Cited by 48 (6 self)
 Add to MetaCart
(Show Context)
Abstract. We present the metatheory behind the code generation facilities of Isabelle/HOL. To bridge the gap between the source (higherorder logic with type classes) and the many possible targets (functional programming languages), we introduce an intermediate language, MiniHaskell. To relate the source and the intermediate language, both are given a semantics in terms of higherorder rewrite systems (HRSs). In a second step, type classes are removed from MiniHaskell programs by means of a dictionary translation; we prove the correctness of this step. Building on equational logic also directly supports a simple but powerful algorithm and data refinement concept. 1 Introduction and related work Like many theorem provers, Isabelle/HOL can generate functional programs from recursive functions specified in the logic. Many applications have taken advantage of this feature, e.g. the certified termination analysis tool CeTA [19] or the Quickcheck counterexample search [3]. The initial code generator [2] has since
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 29 (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 26 (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 vari ..."
Abstract

Cited by 24 (9 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.
Constructive type classes in Isabelle
 TYPES FOR PROOFS AND PROGRAMS
, 2007
"... We reconsider the wellknown concept of Haskellstyle type classes within the logical framework of Isabelle. So far, axiomatic type classes in Isabelle merely account for the logical aspect as predicates over types, while the operational part is only a convention based on raw overloading. Our more e ..."
Abstract

Cited by 20 (7 self)
 Add to MetaCart
(Show Context)
We reconsider the wellknown concept of Haskellstyle type classes within the logical framework of Isabelle. So far, axiomatic type classes in Isabelle merely account for the logical aspect as predicates over types, while the operational part is only a convention based on raw overloading. Our more elaborate approach to constructive type classes provides a seamless integration with Isabelle locales, which are able to manage both operations and logical properties uniformly. Thus we combine the convenience of type classes and the flexibility of locales. Furthermore, we construct dictionary terms derived from notions of the type system. This additional internal structure provides satisfactory foundations of type classes, and supports further applications, such as code generation and export of theories and theorems to environments without type classes.