Skip to content

Instantly share code, notes, and snippets.

View johnchandlerburnham's full-sized avatar
💭
Λ∀

John Chandler Burnham johnchandlerburnham

💭
Λ∀
View GitHub Profile
@johnchandlerburnham
johnchandlerburnham / W.fm
Last active June 23, 2020 16:18
W types in Formality
W(A : Type, B : A -> Type) : Type
w<P : W(A,B) -> Type> ->
(sup : (x: A, f: B(x) -> W(A,B)) -> P(W.sup<A,B>(x,f))) ->
P(w)
W.sup<A: Type, B: A -> Type>(x: A, f: B(x) -> W(A,B)) : W(A,B)
<P> (sup) sup(x,f)
T Two
| t0;
@johnchandlerburnham
johnchandlerburnham / Wau.hs
Last active May 30, 2021 14:53
system wau preview
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
module Wau where
import Data.Map (Map)
import qualified Data.Map as M
import Data.Maybe (isJust)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.STRef
@johnchandlerburnham
johnchandlerburnham / contract.ya
Created June 22, 2021 13:42
A sketch of smart contracts as dependent records in Yatima
package example_contract
open introit
open contract
lang contract
where
// pure datatypes are defined outside of contracts
data SimpleToken {
value: Integer,
mintedBy: Address,