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
| ------------ SYNTAX ------------- | |
| Γ ::= ε | Γ (x : A) | |
| A, B, f, e ::= Sort | Sort₁ | x | f e | (x : A) → B | |
| ------------ JUDGEMENT FORMS ------------- | |
| Γ con |
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
| module Data.DepPath | |
| import Data.Nat | |
| import Data.Vect | |
| ||| Equivalent to the built-in `replace`. | |
| public export | |
| transport1 : (0 a0 : Type) | |
| -> (0 a1 : a0 -> Type) | |
| -> (0 x0 : a0) |
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
| %default total | |
| data Use = None | Once | Many | |
| %hide Prelude.Num.(*) | |
| %hide Prelude.Num.(+) | |
| %hide Prelude.List | |
| %hide Prelude.(::) | |
| %hide Prelude.Nil | |
| %hide Prelude.map |
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
| -- NOT A SELF-SUSTAINED EXAMPLE, WON'T RUN ON ITS OWN. | |
| ||| Any Lua value marked with a label, basically we assign a type to it. | |
| export | |
| data Typed : (label : a) -> Type where [external] | |
| ||| A proof that the given typed value is a table with an assessible key `field` holding a value of type `return` | |
| ||| Users can't normally build this proof term. | |
| export |
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
| -- interface A x where | |
| -- constructor MkA | |
| -- methodA : x | |
| -- interface A x => B x where | |
| -- constructor MkB | |
| -- methodB : x | |
| -- A Bool where | |
| -- methodA = True |