Publication | Closed Access
Safe zero-cost coercions for Haskell
25
Citations
20
References
2014
Year
Unknown Venue
EngineeringType TheoryGenerative Type AbstractionsSoftware AnalysisFormal VerificationSafe Zero-cost CoercionsGeneric ProgrammingDependently Typed ProgrammingNew MechanismType SafetyMechanism DesignProgramming Language TheoryPolymorphism (Computer Science)Computer EngineeringComputer ScienceType SystemFunctional ProgrammingFunctional Programming LanguageAutomated ReasoningProgram AnalysisFormal Methods
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.
| Year | Citations | |
|---|---|---|
Page 1
Page 1