[Haskell-cafe] Tagless interpreter, expression problem and zipper

oleg at okmij.org oleg at okmij.org
Wed Mar 9 12:40:46 CET 2011

The Tagless final approach can do context-sensitive evaluation, using
the well-known trick from the denotational semantics that explicating
the context turns context-sensitive semantics to compositional. The
trick isn't out of place given how much tagless-final approach is
related to denotational semantics.

The non-compositional processing has been discussed at length at
lectures last year. Please see the explanation and the code at

  Non-compositionality: Fold-unlike processing

Interestingly, one example FlatF.hs mentioned on the above page
specifically talks about the context of being the left operand of the
addition (the goal was to `flatten' additions, to re-associate them to
the right). That is the same context as you are after, it seems.

The detailed lecture notes will be eventually available.

More information about the Haskell-Cafe mailing list