Sun Mar 21 17:22:58 CET 2010


So, how do you compose a compiler that constructs a graph, and a link
mechanism for that graph?

( Actually, there are 2 problems: external link mechanism + internal
storage management )

More concretely.  The result is a collection XHTML file with holes,
and a collection of leaf nodes (i.e. png images), where the holes
represent <a/> link elements.

Higher order syntax?

Let's unify nodes.  Each object has a unique id (both xhtml and opaque
nodes are represented as type-tagged binary blobs).  The result is then:

      * repr :: id -> (mime, stream)      -- provided by compiler
      * link :: id -> url                 -- provided by linker

Constraint: the urls need to be permanent (don't break external links)
and pretty/meaningful.  Currently the tex->html/png compiler has: