erts/etc/common/erlc.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |