Skip to content

Instantly share code, notes, and snippets.

View Mesabloo's full-sized avatar
🦐

Mesabloo Mesabloo

🦐
  • France
View GitHub Profile
@Mesabloo
Mesabloo / LAM.hs
Created August 3, 2019 14:37 — forked from cheery/LAM.hs
Linear abstract machine interpreter steps in Haskell
-- The linear abstract machine
-- as described in the "The Linear Abstract Machine"
-- Environment is a representation of a canonical combinator
-- the canonical combinator u ⊗ v is represented by Ja, and 1 by Nil
-- the canonical combinator y ∘ v represented by Comb: y is piece of code.
--
-- Code is list of primitive instructions.
--
-- Sequential composition becomes concatenation (in opposite order),