Last active
March 5, 2018 14:55
-
-
Save useronym/bb504683fcaaf60474168a00d3bd4cb6 to your computer and use it in GitHub Desktop.
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
open import Data.List using (List; _∷_; []; [_]; reverse) | |
open import Data.String using (String; toList; fromList) | |
open import Category.Monad.State | |
data _∈_ {A : Set} : A → List A → Set where | |
here : ∀ {a xs} → a ∈ (a ∷ xs) | |
there : ∀ {a b xs} → a ∈ xs → a ∈ (b ∷ xs) | |
infix 7 _∈_ | |
Ctx : Set | |
Ctx = List {!!} -- whatever | |
-- Compilation state: list of identifiers assigned to bound variables. | |
St : Ctx → Set | |
St Γ = ∀ {x} → x ∈ Γ → String | |
open RawMonadState (StateMonadState (St {!!})) -- What do I put here? | |
-- Compilation monad. | |
Compile : Ctx → _ | |
Compile Γ = State (St Γ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment