Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View rectypes.rkt
#lang typed/racket
(MyRec a)
(U a (Pair 'rec (MyRec a))))
(: unwrap (-> (MyRec (MyRec Symbol)) (MyRec Symbol)))
(define (unwrap my_rec)
(match my_rec [(cons 'rec elem) elem]))
View erlc_compiler.rst

Notes on Erlang Compiler



ilya-klyuchnikov / mrsc.hs
Created Apr 25, 2011
How to combine supercompilers
View mrsc.hs
import Control.Monad
import Data.Maybe
data DriveStep e = DriveStep e
type Driver e = e -> DriveStep e
type Whistle e = [e] -> e -> Maybe e
type Rebuilder e = e -> e -> e
type MRebuilder e = e -> e -> [e]
data SC e = SC {drive :: Driver e, whistle :: Whistle e,