A principled approach to programming with nested types in Haskell
Johann, Patricia and Ghani, Neil (2009) A principled approach to programming with nested types in Haskell. Higher-Order and Symbolic Computation, 22 (2). pp. 155-189. (https://doi.org/10.1007/s10990-009-9047-7)
Full text not available in this repository.Request a copyAbstract
Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the buildcombinator, and immediately consumed using the foldcombinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines buildcombinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell.
ORCID iDs
Johann, Patricia and Ghani, Neil ORCID: https://orcid.org/0000-0002-3988-2560;-
-
Item type: Article ID code: 33724 Dates: DateEvent30 June 2009PublishedSubjects: Science > Mathematics > Electronic computers. Computer science Department: Faculty of Science > Computer and Information Sciences Depositing user: Pure Administrator Date deposited: 18 Oct 2011 09:46 Last modified: 11 Nov 2024 09:51 Related URLs: URI: https://strathprints.strath.ac.uk/id/eprint/33724