The Sketch of a Polymorphic Symphony
Ralf Laemmel

TL;DR
This paper presents a detailed Haskell-based model of functional strategies that combine polymorphism, run-time type case, and traversal combinators to enable flexible, parameterized, and typed generic programming schemes.
Contribution
It introduces a novel Haskell model for functional strategies with advanced parameterization and overloading, enhancing typed generic traversal capabilities.
Findings
Captures common traversal schemes in a highly parameterized style
Designs parameters for control-flow, data-flow, and traversal characteristics
Provides a benchmark suite for typed generic programming setups
Abstract
In previous work, we have introduced functional strategies, that is, first-class generic functions that can traverse into terms of any type while mixing uniform and type-specific behaviour. In the present paper, we give a detailed description of one particular Haskell-based model of functional strategies. This model is characterised as follows. Firstly, we employ first-class polymorphism as a form of second-order polymorphism as for the mere types of functional strategies. Secondly, we use an encoding scheme of run-time type case for mixing uniform and type-specific behaviour. Thirdly, we base all traversal on a fundamental combinator for folding over constructor applications. Using this model, we capture common strategic traversal schemes in a highly parameterised style. We study two original forms of parameterisation. Firstly, we design parameters for the specific control-flow,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems
