Skip to content

Instantly share code, notes, and snippets.

Avatar
👁️‍🗨️

ilya-klyuchnikov

👁️‍🗨️
View GitHub Profile
View rectypes.rkt
#lang typed/racket
(define-type
(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

erlc

erts/etc/common/erlc.c

@ilya-klyuchnikov
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,