Earlier quoted context omitted.
"find an embeddable Prolog compiler for your language of choice (e.g., MiniKanren for Racket), and then simply emit a flat list of Prolog equations out of your source language AST (do the lexical scoping pass first). Easy. And easily extendable to dependent typing and all that fancy stuff." So, you represent the AST associations and type-checks as Prolog logic rules that operate on predicates describing the AST? And…
For example, you have an AST node for 'x + 2', encoded as 'apply(apply(var("+"), var("x")), const("2"))' (we're talking about ML, so it is curried here). Firstly, all the expression nodes must be annotated with type tags: 'A1:apply(A2:apply(A3:var("plus"),A4:var("x")), A5:const("2"))'. Then your typing pass walking over this segment of AST would generate the following (mostly trivial) equations A5=integer // from con…
I don't quite understand this phrase "you'll get all An type values to attach to your AST". Do you just mean "all type values" or is "An type" a technical term?