FPCA '89 Proceedings of the fourth international conference on Functional programming languages and computer architecture
The formal semantics of programming languages: an introduction
The formal semantics of programming languages: an introduction
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
Science of Computer Programming - Special issue on mathematics of program construction
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Lambda in Motion: Controlling Robots with Haskell
PADL '99 Proceedings of the First International Workshop on Practical Aspects of Declarative Languages
Deterministic, Error-Correcting Combinator Parsers
Advanced Functional Programming, Second International School-Tutorial Text
Boxes go bananas: encoding higher-order abstract syntax with parametric polymorphism
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Faking it Simulating dependent types in Haskell
Journal of Functional Programming
Type-safe, self inspecting code
Haskell '04 Proceedings of the 2004 ACM SIGPLAN workshop on Haskell
Journal of Functional Programming
Fast and loose reasoning is morally correct
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Introduction to Automata Theory, Languages, and Computation (3rd Edition)
Introduction to Automata Theory, Languages, and Computation (3rd Edition)
System F with type equality coercions
TLDI '07 Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation
Applicative programming with effects
Journal of Functional Programming
Parametric higher-order abstract syntax for mechanized semantics
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages
Journal of Functional Programming
Parser combinators for ambiguous left-recursive grammars
PADL'08 Proceedings of the 10th international conference on Practical aspects of declarative languages
Typed Transformations of Typed Grammars: The Left Corner Transform
Electronic Notes in Theoretical Computer Science (ENTCS)
Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
MPC'10 Proceedings of the 10th international conference on Mathematics of program construction
Explicitly recursive grammar combinators: a better model for shallow parser DSLs
PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
Idioms are Oblivious, Arrows are Meticulous, Monads are Promiscuous
Electronic Notes in Theoretical Computer Science (ENTCS)
A semantic model for graphical user interfaces
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Parsing with derivatives: a functional pearl
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
Outsidein(x) modular type inference with local assumptions
Journal of Functional Programming - Dedicated to ICFP 2009
Functional programming with structured graphs
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Abstract syntax graphs for domain specific languages
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Finally tagless observable recursion for an abstract grammar model
Journal of Functional Programming
Abstract syntax graphs for domain specific languages
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Hi-index | 0.00 |
In a lazy functional language, the standard encoding of recursion in DSLs uses the host language's recursion, so that DSL algorithms automatically use the host language's least fixpoints, even though many domains require algorithms to produce different fixpoints. In particular, this is the case for DSLs implemented as Applicative functors (structures with a notion of pure computations and function application). We propose a recursion primitive afix that models a recursive binder in a finally tagless HOAS encoding, but with a novel rank-2 type that allows us to specify and exploit the effects-values separation that characterizes Applicative DSLs. Unlike related approaches for Monads and Arrows, we model effectful recursion, not value recursion. Using generic programming techniques, we define an arity-generic version of the operator to model mutually recursive definitions. We recover intuitive user syntax with a form of shallow syntactic sugar: an alet construct that syntactically resembles the let construct, which we have implemented in the GHC Haskell compiler. We describe a proposed axiom for the afix operator. We demonstrate usefulness with examples from Applicative parser combinators and functional reactive programming. We show how higher-order recursive operators like many can be encoded without special library support, unlike previous approaches, and we demonstrate an implementation of the left recursion removal transform.