Add `List.Base.build`/Church encodings of `Data` types
jamesmckinna opened this issue · comments
Justifiably, we prioritise the (weakly-)initial-algebra approach to Data.*
datatypes via... data
definitions, but looking at haskell's Foldable
for #2300 I'm conscious that we don't have any implementation of build
for List
, or more systematically, Church-style analogues for the basic datatypes of the library, together with their build
-based equivalence to the standard ones.
This issue might be moot, but it has already come up for me in #1962 as to whether or not to take an initial algebra/free extension approach to Free
constructions, or to proceed via a Church-style encoding. I think it's worth further discussion as an issue in its own right, as well as waking up the thread about API vs. implementation in the library design...