Mercurial > hg > Papers > 2018 > nozomi-master
comparison paper/src/CodeSegment.agda @ 59:5450e7ae5fa5
Mini fixes
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 01 Feb 2017 15:27:15 +0900 |
parents | 68bf744d726e |
children |
comparison
equal
deleted
inserted
replaced
58:68bf744d726e | 59:5450e7ae5fa5 |
---|---|
1 data CodeSegment {l1 l2 : Level} (I : Set l1) (O : Set l2) : Set (l ⊔ l1 ⊔ l2) where | 1 data CodeSegment {l1 l2 : Level} (I : Set l1) (O : Set l2) : Set (l ⊔ l1 ⊔ l2) where |
2 cs : (I -> O) -> CodeSegment I O | 2 cs : (I -> O) -> CodeSegment I O |
3 | |
4 cs2 : CodeSegment ds1 ds1 | |
5 cs2 = cs id | |
6 | |
7 cs1 : CodeSegment ds1 ds1 | |
8 cs1 = cs (\d -> goto cs2 d) | |
9 | |
10 cs0 : CodeSegment ds0 ds1 | |
11 cs0 = cs (\d -> goto cs1 (record {c = (ds0.a d) + (ds0.b d)})) | |
12 | |
13 main : ds1 | |
14 main = goto cs0 (record {a = 100 ; b = 50}) |