[Colloquium] Popley/MS Presentation/Feb 20, 2014

Margaret Jaffey margaret at cs.uchicago.edu
Fri Feb 7 11:09:53 CST 2014


This is an announcement of Sneha Popley's MS Presentation.

Sneha Popley's advisor is Prof. David MacQueen.

------------------------------------------------------------------------------
Date:  Thursday, February 20, 2014

Time:  10:00 AM

Place:  Searle 240A

M.S. Candidate:  Sneha Popley

M.S. Paper Title: Modules and the Global Environment in Type Classes

Abstract:
Wadler et al. introduced type classes in Haskell to support a form of
generalized ad hoc polymorphism. The equality operator is often
overloaded, but it may have interpretations for an infinite class of
types including primitive types like integers and strings, and
compound types like products and lists. In Standard ML, it is even
possible to define functions that are polymorphic over the class of
types supporting a computable equality (so called equality types).
Type classes were designed to generalize Standard ML's treatment of
overloaded equality, providing a more general solution to the issue of
ad hoc polymorphism by extending parametric polymorphism. In
parametric polymorphism, functions are independent of type parameters
(length of a list, reverse a list, etc). Type classes parameterize
over types that have associated interfaces of functions, such as the
arithmetic operators for numeric types and the equality operation for
types.

In this paper, we provide a critical analysis of the type class system
relative to SML modules using examples and type theory. We focus on
one of the main features of the type class system: the global instance
environment. Type inference with type classes relies on a
globally-scoped environment that is automatically populated with every
instance declaration in a program. We discuss the limitations of this
approach, including the inability to name instances or restrict their
scope. Since type classes rely on the implicit flow of information in
Hindley-Milner type inference, they can also create situations in
which overloading is hard to mentally resolve when reading code.

Our other main contribution is a discussion of the problem of
integrating type classes with a strong module system. One of the
limitations of the global instance environment is that it makes
integration with a true module system infeasible. Wehr presented a
constructive comparison of type class and modules with a formal
translation between the two. Dreyer et al. found Wehr's translation
impractical and proposed an extension to the module system to support
type classes. However, Dreyer et al. ignore the global instance
environment, requiring users to import instances into parts of a
program explicitly. Kilpatrick et al. introduce Backpack, a language
that goes on top of Haskell's weak module system to extend its
modularity with separately type checked packages. They don't support
type classes yet, and they expect global scoping and lack of named
instances to create major challenges. We use code and type theory from
Wehr, Dreyer, and Kilpatrick's systems to illustrate the problems with
a global instance environment in type classes.

Sneha's advisors are Prof. To Be  Arranged and Prof. David MacQueen

Login to the Computer Science Department website for details:
 https://www.cs.uchicago.edu/phd/ms_announcements#sepopley

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Margaret P. Jaffey            margaret at cs.uchicago.edu
Department of Computer Science
Student Support Rep (Ry 156)               (773) 702-6011
The University of Chicago      http://www.cs.uchicago.edu
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


More information about the Colloquium mailing list