A Proper X86 Assembler in Haskell Using the Escardó-Oliva Functional

Writing an assembler turns out to be an interesting example: one needs to calculate distances between jumps and their target labels, and the target may appear after the label. It turns out that one can write a one-pass assembler using the tardis monad or in Curry , using logic programming.