Author:
SULZMANN MARTIN,DUCK GREGORY J.,PEYTON-JONES SIMON,STUCKEY PETER J.
Abstract
AbstractFunctional dependencies are a popular and useful extension to Haskell style type classes. We give a reformulation of functional dependencies in terms of Constraint Handling Rules (CHRs). In previous work, CHRs have been employed for describing user-programmable type extensions in the context of Haskell style type classes. Here, we make use of CHRs to provide for the first time a concise result that under some sufficient conditions, functional dependencies allow for sound, complete and decidable type inference. The sufficient conditions imposed on functional dependencies can be very limiting. We show how to safely relax these conditions and suggest several sound extensions of functional dependencies. Our results allow for a better understanding of functional dependencies and open up the opportunity for new applications.
Publisher
Cambridge University Press (CUP)
Cited by
44 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. The New Normal: We Cannot Eliminate Cuts in Coinductive Calculi, But We Can Explore Them;Theory and Practice of Logic Programming;2020-09-22
2. Heuristics-based Type Error Diagnosis for Haskell;IFL 2020: Proceedings of the 32nd Symposium on Implementation and Application of Functional Languages;2020-09-02
3. Describing microservices using modern Haskell (experience report);Proceedings of the 13th ACM SIGPLAN International Symposium on Haskell;2020-08-09
4. A compiler architecture for domain-specific type error diagnosis;Open Computer Science;2019-02-14
5. Bidirectional type class instances;Proceedings of the 12th ACM SIGPLAN International Symposium on Haskell - Haskell 2019;2019