University of Cambridge > Talks.cam > Microsoft Research Cambridge, public talks > Reasoning about GADT Pattern Matching in Haskell

Reasoning about GADT Pattern Matching in Haskell

Add to your list(s) Download to your calendar using vCal

If you have a question about this talk, please contact Microsoft Research Cambridge Talks Admins.

This event may be recorded and made available internally or externally via http://research.microsoft.com. Microsoft will own the copyright of any recordings made. If you do not wish to have your image/voice recorded please consider this before attending

Generalized Algebraic Data Types (GADTs) are a simple but powerful generalization of Algebraic Data Types (ADTs) in Haskell and the ML family.

Reasoning about the accessibility of case branches and the exhaustiveness of pattern matching is a well studied and efficiently solved problem for ADTs. However, classic algorithms fall short in the presence of GAD Ts, issuing false warnings: Since GADT constructors introduce local constraints, we must allow for the fact that particular combinations of patterns and/or values cannot actually occur.

We present a novel algorithm for checking pattern matching that accounts for Haskell’s laziness and relies on implication constraints generated and solved by the OutsideIn(X) type inference engine. Since we rely on the existing type inference engine, our approach is efficient and robust to future extensions of the type system. We also report on a proof-of-concept implementation of our algorithm in GHC .

This talk is part of the Microsoft Research Cambridge, public talks series.

Tell a friend about this talk:

This talk is included in these lists:

Note that ex-directory lists are not shown.

 

© 2006-2024 Talks.cam, University of Cambridge. Contact Us | Help and Documentation | Privacy and Publicity