
FirstClass Subtypes
First class type equalities, in the form of generalized algebraic data t...
read it

Code Reuse With Transformation Objects
We present an approach for a lightweight datatypegeneric programming in...
read it

Introducing Type Properties
In type theory, we can express many practical ideas by attributing some ...
read it

Do People Prefer "Natural" code?
Natural code is known to be very repetitive (much more so than natural l...
read it

Memoisation: Purely, Leftrecursively, and with (Continuation Passing) Style
Memoisation, or tabling, is a wellknown technique that yields large imp...
read it

Parametricity and SemiCubical Types
We construct a model of type theory enjoying parametricity from an arbit...
read it

Expressing Sparse Matrix Computations for Productive Performance on Spatial Architectures
This paper addresses spatial programming of sparse matrix computations f...
read it
Programming with Applicativelike expressions
The fact that Applicative type class allows one to express simple parsers in a variableless combinatorial style is well appreciated among Haskell programmers for its conceptual simplicity, ease of use, and usefulness for semiautomated code generation (metaprogramming). We notice that such Applicative computations can be interpreted as providing a mechanism to construct a data type with "ports" "pluggable" by subcomputations. We observe that it is this property that makes them so much more convenient in practice than the usual way of building the same computations using conventional composition. We distill this observation into a more general algebraic structure of (and/or technique for expressing) "Applicativelike" computations and demonstrate several other instances of this structure. Our interest in all of this comes from the fact that the aforementioned instances allow us to express arbitrary transformations between simple data types of a single constructor (similarly to how Applicative parsing allows to transform from streams of Chars to such data types) using a style that closely follows conventional Applicative computations, thus greatly simplifying (if not completely automating away) a lot of boilerplate code present in many functional programs.
READ FULL TEXT VIEW PDF
Comments
There are no comments yet.