Oleg Kiselyov's site hosts papers and notes on functional programming, type systems, effects, macros, and OCaml and Scheme.
HN commenters call his papers brilliant and insightful, praise his clear writing, and cite his notes on OCaml generalization and tagless-final interpreters.
Sure... most people familiar with zippers know that it can be thought of as the algebraic derivative the underlying type.
What’s perhaps less known is that this is the same as ‘differentiating’ the traversal of the data type.
The continuation monad is a sort of ‘derivative’ of a computation in that it nearly captures the ‘infinitesmal’ difference between two steps in a computation.
If your computation is the traversal of your tree, list, or text markup, then you can make a zipper from that without having to declare new data structures. This is isomorphic to declaring your own data structure. Its only advantage is convenience (that I know of at least).
Oleg Kiselyov goes into great detail with this idea and has lots of example code: http://okmij.org/ftp/continuations/zipper.html
This is a nice introductory tutorial on how to implement Hindley-Milner type inference: https://github.com/jozefg/hm
This is a more advanced tutorial that illustrates a nice but tricky optimization that OCaml's type checker internally uses: http://okmij.org/ftp/ML/generalization.html
Finally, TAPL's type checkers are pretty good. They aren't designed for efficiency, though. They're designed to closely follow the book's contents: http://www.cis.upenn.edu/~bcpierce/tapl/checkers/
This looks like a reinvention of the final, tagless interpreter, which has been a great, common technique in functional languages for awhile:
https://okmij.org/ftp/tagless-final/index.html#tagless-final
It's an interpreter though, not a JIT. This kind of programming language thing is a bit of a hobby horse of mine, so see the comment I just posted on this for full details:
https://codereview.stackexchange.com/questions/259045/poor-mans-jit-using-nested-lambdas/297544#297544
Using blocks for looping (i.e. using callbacks) is actually a great feature. See Oleg Kiselyov's spirited defense of callbacks (as opposed to iterator objects) here: http://okmij.org/ftp/papers/LL3-collections-enumerators.txt
The fact that `break`, `next`, and `return` work the way they do in blocks is a remarkable simplification; it turns a set of constructs that work only on loops into functional constructs that work on functions, broadening their usefulness.
I don't believe that continuations are a corner of programming language theory that is well-loved and and well-understood by programmers at large, are they? Even amongst experienced functional programmers they seem to be thought of as rather difficult. Oleg Kiselyov has written extensively on them but his work has not been brought to the masses in the same way that his work in iteratees has.
http://okmij.org/ftp/continuations/index.html
> 2. Turing complete macros (not just syntax-case)
I assume, you mean `syntax-rules` here.
If I understand correctly, it's pretty easy to simulate a paper tape
with `syntax-rules` macro - that is `syntax-rules` macros are already
"Turing complete".
https://okmij.org/ftp/Scheme/macros.html#turing-completeness-hygiene
But ... I know what you mean - in practise `syntax-case` or `syntax-parse` would be lovely to have.