Type Classes and Instance Chains: A Relational Approach

Type classes, first proposed during the design of the Haskell programming language, extend standard type systems to support overloaded functions. Since their introduction, type classes have been used to address a range of problems, from typing ordering and arithmetic operators to describing heteroge...

Full description

Bibliographic Details
Main Author: Morris, John Garrett
Format: Others
Published: PDXScholar 2013
Subjects:
Online Access:https://pdxscholar.library.pdx.edu/open_access_etds/1010
https://pdxscholar.library.pdx.edu/cgi/viewcontent.cgi?article=2009&context=open_access_etds
id ndltd-pdx.edu-oai-pdxscholar.library.pdx.edu-open_access_etds-2009
record_format oai_dc
spelling ndltd-pdx.edu-oai-pdxscholar.library.pdx.edu-open_access_etds-20092019-10-20T04:45:30Z Type Classes and Instance Chains: A Relational Approach Morris, John Garrett Type classes, first proposed during the design of the Haskell programming language, extend standard type systems to support overloaded functions. Since their introduction, type classes have been used to address a range of problems, from typing ordering and arithmetic operators to describing heterogeneous lists and limited subtyping. However, while type class programming is useful for a variety of practical problems, its wider use is limited by the inexpressiveness and hidden complexity of current mechanisms. We propose two improvements to existing class systems. First, we introduce several novel language features, instance chains and explicit failure, that increase the expressiveness of type classes while providing more direct expression of current idioms. To validate these features, we have built an implementation of these features, demonstrating their use in a practical setting and their integration with type reconstruction for a Hindley-Milner type system. Second, we define a set-based semantics for type classes that provides a sound basis for reasoning about type class systems, their implementations, and the meanings of programs that use them. 2013-06-04T07:00:00Z text application/pdf https://pdxscholar.library.pdx.edu/open_access_etds/1010 https://pdxscholar.library.pdx.edu/cgi/viewcontent.cgi?article=2009&context=open_access_etds Dissertations and Theses PDXScholar Functional programming languages Haskell (Computer program language) Functional programming (Computer science) Programming Languages and Compilers
collection NDLTD
format Others
sources NDLTD
topic Functional programming languages
Haskell (Computer program language)
Functional programming (Computer science)
Programming Languages and Compilers
spellingShingle Functional programming languages
Haskell (Computer program language)
Functional programming (Computer science)
Programming Languages and Compilers
Morris, John Garrett
Type Classes and Instance Chains: A Relational Approach
description Type classes, first proposed during the design of the Haskell programming language, extend standard type systems to support overloaded functions. Since their introduction, type classes have been used to address a range of problems, from typing ordering and arithmetic operators to describing heterogeneous lists and limited subtyping. However, while type class programming is useful for a variety of practical problems, its wider use is limited by the inexpressiveness and hidden complexity of current mechanisms. We propose two improvements to existing class systems. First, we introduce several novel language features, instance chains and explicit failure, that increase the expressiveness of type classes while providing more direct expression of current idioms. To validate these features, we have built an implementation of these features, demonstrating their use in a practical setting and their integration with type reconstruction for a Hindley-Milner type system. Second, we define a set-based semantics for type classes that provides a sound basis for reasoning about type class systems, their implementations, and the meanings of programs that use them.
author Morris, John Garrett
author_facet Morris, John Garrett
author_sort Morris, John Garrett
title Type Classes and Instance Chains: A Relational Approach
title_short Type Classes and Instance Chains: A Relational Approach
title_full Type Classes and Instance Chains: A Relational Approach
title_fullStr Type Classes and Instance Chains: A Relational Approach
title_full_unstemmed Type Classes and Instance Chains: A Relational Approach
title_sort type classes and instance chains: a relational approach
publisher PDXScholar
publishDate 2013
url https://pdxscholar.library.pdx.edu/open_access_etds/1010
https://pdxscholar.library.pdx.edu/cgi/viewcontent.cgi?article=2009&context=open_access_etds
work_keys_str_mv AT morrisjohngarrett typeclassesandinstancechainsarelationalapproach
_version_ 1719271642761265152