Last active
March 27, 2020 09:40
-
-
Save Odomontois/5a446a38a737d4e21f4692eb808f210a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| \data IO (A : \Set) : \Set (\suc \lp) | |
| | Input (A = Nat) | |
| | Output Nat (A = (\Sigma)) | |
| \func UnaryTC => \Set -> \Set (\suc \lp) | |
| \data ITreeF (E : UnaryTC) (R : \Set) (X : \Type) | |
| | retF R | |
| | tauF X | |
| | visF {A : \Set} (event : E A) (k : A -> X) | |
| \func ITree (E : UnaryTC) (R : \Set) : \Type => \Sigma (X : \Type) X (X -> ITreeF E R X) | |
| \func ret {E : UnaryTC} {R : \Set} (r : R) : ITree E R => (\Sigma , (), \lam _ => retF r) | |
| \func tau {E : UnaryTC} {R : \Set} (t : ITree E R) : ITree E R => t | |
| \func vis {E : UnaryTC} {R : \Set} {A : \Set} (event : E A) (k : A -> ITree E R) : ITree E R => | |
| (\Pi (a : A) -> (k a).1 ,\lam a => (k a).2,\lam f => visF event (\lam _ a' => (k a').2)) | |
| \func spin : ITree IO (\Sigma) => (\Sigma, (), \lam _ => tauF ()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.