Safe zero-cost coercions for Haskell
- 28 July 2016
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 26
Abstract
Generative type abstractions – present in Haskell, OCaml, and other languages – are useful concepts to help prevent programmer errors. They serve to create new types that are distinct at compile time but share a run-time representation with some base type. We present a new mechanism that allows for zero-cost conversions between generative type abstractions and their representations, even when such types are deeply nested. We prove type safety in the presence of these conversions and have implemented our work in GHC.Keywords
This publication has 10 references indexed in Scilit:
- Giving Haskell a promotion2012
- On the power of coercion abstraction2012
- OutsideIn(X) Modular type inference with local assumptionsJournal of Functional Programming, 2011
- Ott: Effective tool support for the working semanticistJournal of Functional Programming, 2010
- A Church-Style Intermediate Language for ML F2010
- System F with type equality coercions2007
- Associated type synonyms2005
- Typed compilation of inclusive subtyping2000
- The Definition of Standard ML1997
- Type classes in HaskellACM Transactions on Programming Languages and Systems, 1996