Author:
BREITNER JOACHIM,EISENBERG RICHARD A.,PEYTON JONES SIMON,WEIRICH STEPHANIE
Abstract
AbstractGenerative 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.
Publisher
Cambridge University Press (CUP)
Reference25 articles.
1. Marlow S. (ed) (2010) Haskell 2010 Language Report.
2. On the power of coercion abstraction
3. Type classes in Haskell
Cited by
11 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Dependently-Typed Programming with Logical Equality Reflection;Proceedings of the ACM on Programming Languages;2023-08-30
2. Seeking stability by being lazy and shallow: lazy and shallow instantiation is user friendly;Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell;2021-08-18
3. Monotone recursive types and recursive data representations in Cedille;Mathematical Structures in Computer Science;2021-06
4. Kinds are calling conventions;Proceedings of the ACM on Programming Languages;2020-08-02
5. Efficient lambda encodings for Mendler-style coinductive types in Cedille;Electronic Proceedings in Theoretical Computer Science;2020-05-01