Haskell
  • Doubly-linked Lists in Haskell

    by Vanessa McHale | Haskell

    Allison (1989) gives an example of tying the knot to build an immutable, doubly-linked list from a list. However, this does not support the usual insertion and deletion.

  • Performance of Sharing

    by Vanessa McHale | Haskell

    After paraphrasing a computation I had found in a paper, I realized I had ruined its performance.

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

    by Vanessa McHale | Haskell

    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.

  • Strides Are Scans

    by Vanessa McHale | Haskell

    For an array with dimensions \(n_1,n_2,\ldots n_r\) stored in column-major order, an element with indices \(a_1,a_2,\ldots a_n\) is located at offset

  • Num Instances for ASTs

    by Vanessa McHale | Haskell

    One can define a Num instance in Haskell for ASTs of expressions, viz.