Filters








248 Hits in 4.6 sec

Safe zero-cost coercions for Haskell

Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones, Stephanie Weirich
2014 Proceedings of the 19th ACM SIGPLAN international conference on Functional programming - ICFP '14  
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 describe the design of safe coercions (Section 2), which introduces the function coerce :: Coercible a b ⇒ a → b and a new type class Coercible.  ...  Acknowledgments Thanks to Antal Spector-Zabusky for contributing to this version of FC; and to Edward Kmett and Dimitrios Vytiniotis for discussion and feedback.  ... 
doi:10.1145/2628136.2628141 dblp:conf/icfp/BreitnerEJW14 fatcat:fh445cf5zrcxdedft4ziy7mmfq

Safe zero-cost coercions for Haskell

JOACHIM BREITNER, RICHARD A. EISENBERG, SIMON PEYTON JONES, STEPHANIE WEIRICH
2016 Journal of functional programming  
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.  ...  AbstractGenerative type abstractions – present in Haskell, OCaml, and other languages – are useful concepts to help prevent programmer errors.  ...  Acknowledgments Thanks to Antal Spector-Zabusky for contributing to this version of FC; and to Edward Kmett and Dimitrios Vytiniotis for discussion and feedback.  ... 
doi:10.1017/s0956796816000150 fatcat:ee7rlcbwwzdxfn6lwv56dzcczu

Safe zero-cost coercions for Haskell

Joachim Breitner, Richard A. Eisenberg, Simon Peyton Jones, Stephanie Weirich
2014 SIGPLAN notices  
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 describe the design of safe coercions (Section 2), which introduces the function coerce :: Coercible a b ⇒ a → b and a new type class Coercible.  ...  Acknowledgments Thanks to Antal Spector-Zabusky for contributing to this version of FC; and to Edward Kmett and Dimitrios Vytiniotis for discussion and feedback.  ... 
doi:10.1145/2692915.2628141 fatcat:afiaulg7tvar5f2kmcqccbawvu

Giving Haskell a promotion

Brent A. Yorgey, Stephanie Weirich, Julien Cretin, Simon Peyton Jones, Dimitrios Vytiniotis, José Pedro Magalhães
2012 Proceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation - TLDI '12  
Static type systems strive to be richly expressive while still being simple enough for programmers to use.  ...  Acknowledgments Thanks to Conor McBride, Tim Sheard, the members of the Penn PL Club, and the anonymous reviewers for many helpful and inspiring suggestions.  ...  Since Haskell types never actually depend on terms and vice versa, types can be safely erased before runtime. This is still true for promoted values.  ... 
doi:10.1145/2103786.2103795 dblp:conf/tldi/YorgeyWCJVM12 fatcat:2tkog37jf5dnhlhovyrxuyjh7u

Dependent Types in Haskell: Theory and Practice [article]

Richard A. Eisenberg
2017 arXiv   pre-print
This dissertation contains several practical examples of Dependent Haskell code, a full description of the differences between Dependent Haskell and today's Haskell, a novel type-safe dependently typed  ...  Haskell, as implemented in the Glasgow Haskell Compiler (GHC), has been adding new type-level programming features for some time.  ...  There are several coercion forms (to wit, 10) that are absolutely essential for Pico to be proven type-safe and yet remain meaningful.  ... 
arXiv:1610.07978v2 fatcat:a4emu7gcqfddznq4wbjf4mvhym

Equality proofs and deferred type errors

Dimitrios Vytiniotis, Simon Peyton Jones, José Pedro Magalhães
2012 Proceedings of the 17th ACM SIGPLAN international conference on Functional programming - ICFP '12  
The Glasgow Haskell Compiler is an optimizing compiler that expresses and manipulates first-class equality proofs in its intermediate language.  ...  The technique requires us to treat equality proofs as possibly-divergent terms; we show how to do so without losing either soundness or the zerooverhead cost model that the programmer expects.  ...  We thank Stephanie Weirich and Brent Yorgey for their detailed comments and suggestions, and the ICFP reviewers for the helpful feedback.  ... 
doi:10.1145/2364527.2364554 dblp:conf/icfp/VytiniotisJM12 fatcat:6lyhgwmh4fdvflk4bxryrmd344

Equality proofs and deferred type errors

Dimitrios Vytiniotis, Simon Peyton Jones, José Pedro Magalhães
2012 SIGPLAN notices  
The Glasgow Haskell Compiler is an optimizing compiler that expresses and manipulates first-class equality proofs in its intermediate language.  ...  The technique requires us to treat equality proofs as possibly-divergent terms; we show how to do so without losing either soundness or the zerooverhead cost model that the programmer expects.  ...  We thank Stephanie Weirich and Brent Yorgey for their detailed comments and suggestions, and the ICFP reviewers for the helpful feedback.  ... 
doi:10.1145/2398856.2364554 fatcat:ktmpsoe3gra7pkkhl6iunmwmcu

Special issue dedicated to ICFP 2014: Editorial

DEREK DREYER, MARY SHEERAN
2016 Journal of functional programming  
We acted as editors for these submissions. This issue includes the six accepted papers, each of which provides substantial new material beyond the original conference version.  ...  In Safe Zero-cost Coercions for Haskell, Breitner, Eisenberg, Peyton Jones, and Weirich show how to support generative type abstraction-a useful feature in many functional languages-whilst also providing  ...  However, that approach involved a complicated extension to the kind language of Haskell.  ... 
doi:10.1017/s0956796816000228 fatcat:raf3t4hb3jahthr3ngcb5oo6zq

Generative type abstraction and type-level computation

Stephanie Weirich, Dimitrios Vytiniotis, Simon Peyton Jones, Steve Zdancewic
2011 SIGPLAN notices  
The result is directly applicable to Haskell, which is rapidly developing support for type-level computation, but the same issues should arise whenever generativity and non-parametric features are combined  ...  Acknowledgements We thank Brent Yorgey and the attendees of the Type System Wrestling sessions at MSR Cambridge for many useful discussions. We wrote this paper using the Ott tool.  ...  All such abstractions and applications, as well as uses of coercions e γ may be erased prior to execution and so impose no run-time costs.  ... 
doi:10.1145/1925844.1926411 fatcat:ud43rj3z6val3grrt357rhzy7m

Generative type abstraction and type-level computation

Stephanie Weirich, Dimitrios Vytiniotis, Simon Peyton Jones, Steve Zdancewic
2011 Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '11  
The result is directly applicable to Haskell, which is rapidly developing support for type-level computation, but the same issues should arise whenever generativity and non-parametric features are combined  ...  Acknowledgements We thank Brent Yorgey and the attendees of the Type System Wrestling sessions at MSR Cambridge for many useful discussions. We wrote this paper using the Ott tool.  ...  All such abstractions and applications, as well as uses of coercions e γ may be erased prior to execution and so impose no run-time costs.  ... 
doi:10.1145/1926385.1926411 dblp:conf/popl/WeirichVJZ11 fatcat:doe5vyefqffczddlwxlgcdkoam

Type invariants for Haskell

Tom Schrijvers, Louis-Julien Guillemette, Stefan Monnier
2008 Proceedings of the 3rd workshop on Programming languages meets program verification - PLPV '09  
In this article, we propose an extension to Haskell that allows the specification of invariants for type classes and open type families, together with accompanying evidence that those invariants hold.  ...  But type-level code is special in that its correctness is crucial to the safety of the program; so except in those cases simple enough for the type checker to see trivially that the code is correct (or  ...  Acknowledgments We are grateful to Brigitte Pientka, Martin Sulzmann and the anonymous reviewers for their helpful comments.  ... 
doi:10.1145/1481848.1481855 dblp:conf/plpv/SchrijversGM09 fatcat:ya24jtahc5emne3ay46ihlmlqi

A specification for dependent types in Haskell

Stephanie Weirich, Antoine Voizard, Pedro Henrique Azevedo de Amorim, Richard A. Eisenberg
2017 Proceedings of the ACM on Programming Languages  
We propose a core semantics for Dependent Haskell, an extension of Haskell with full-spectrum dependent types. Our semantics consists of two related languages.  ...  The second, inspired by the Glasgow Haskell Compiler's core language FC, is its explicitly-typed analogue, suitable for implementation in GHC.  ...  The zip function type checks because in the first branch n is equal to zero, so Nil has a type equal to Vec a n.  ... 
doi:10.1145/3110275 dblp:journals/pacmpl/WeirichVAE17 fatcat:nbjaoyjzdjfq7mxahlytmcbkjy

Coherent explicit dictionary application for Haskell

Thomas Winant, Dominique Devriese
2018 Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell - Haskell 2018  
Global uniqueness of instances is relied upon by libraries for enforcing, for example, that a single order relation is used for all manipulations of an ordered binary tree.  ...  We introduce a novel criterion based on GHC's type argument roles to decide when a dictionary application is safe with respect to global uniqueness of instances.  ...  Acknowledgments We would like to thank Tom Schrijvers for his thoughts on the coherence problem.  ... 
doi:10.1145/3242744.3242752 dblp:conf/haskell/WinantD18 fatcat:67a4dcdek5fjhk4tefavazkciy

Dependently typed programming with singletons

Richard A. Eisenberg, Stephanie Weirich
2012 Proceedings of the 2012 symposium on Haskell symposium - Haskell '12  
To compare with full-spectrum languages, we present an extended example based on an Agda interface for safe database access.  ...  Haskell programmers have been experimenting with dependent types for at least a decade, using clever encodings that push the limits of the Haskell type system.  ...  Already Haskell supports some of this distinction-all constraint evidence (including coercion proofs) is guaranteed to be total .  ... 
doi:10.1145/2364506.2364522 dblp:conf/haskell/EisenbergW12 fatcat:g75xxbtvhjhsbes3csizbug3u4

Dependently typed programming with singletons

Richard A. Eisenberg, Stephanie Weirich
2013 SIGPLAN notices  
To compare with full-spectrum languages, we present an extended example based on an Agda interface for safe database access.  ...  Haskell programmers have been experimenting with dependent types for at least a decade, using clever encodings that push the limits of the Haskell type system.  ...  Already Haskell supports some of this distinction-all constraint evidence (including coercion proofs) is guaranteed to be total .  ... 
doi:10.1145/2430532.2364522 fatcat:mefegjoeurhadls6dvt2qhvmgm
« Previous Showing results 1 — 15 out of 248 results