View Full Document

Giving Haskell a Promotion



View the full content.
View Full Document
View Full Document

15 views

Unformatted text preview:

Giving Haskell a Promotion Brent A Yorgey Stephanie Weirich University of Pennsylvania byorgey sweirich cis upenn edu Julien Cretin INRIA julien cretin inria fr Simon Peyton Jones Dimitrios Vytiniotis Microsoft Research Cambridge simonpj dimitris microsoft com Jose Pedro Magalha es Utrecht University jpm cs uu nl Abstract Static type systems strive to be richly expressive while still being simple enough for programmers to use We describe an experiment that enriches Haskell s kind system with two features promoted from its type system data types and polymorphism The new system has a very good power to weight ratio it offers a significant improvement in expressiveness but by re using concepts that programmers are already familiar with the system is easy to understand and implement Categories and Subject Descriptors D 3 3 Language Constructs and Features Data types and structures Polymorphism F 3 3 Studies of Program Constructs Type structure General Terms Languages Design Keywords Haskell promotion kinds polymorphism 1 Introduction Static type systems are the world s most successful application of formal methods Types are simple enough to make sense to programmers they are tractable enough to be machine checked on every compilation they carry no run time overhead and they pluck a harvest of low hanging fruit It makes sense therefore to seek to build on this success by making the type system more expressive without giving up the good properties we have mentioned Every static type system embodies a compromise it rejects some good programs and accepts some bad ones As the dependently typed programming community knows well the ability to express computation at the type level can improve the fit for example we might be able to ensure that an alleged red black tree really has the red black property Recent innovations in Haskell have been moving in exactly this direction Notably GADTs 24 and type families 25 turn the type system into a modest programming language in its own



Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Giving Haskell a Promotion and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Giving Haskell a Promotion and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?