-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.agda
101 lines (74 loc) · 2.77 KB
/
README.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{-# OPTIONS --rewriting --guardedness --sized-types #-}
{-
To typecheck this file in Emacs with Agda mode, the current directory needs
to be part of the include path: type the following
```
M-x customize-option RET agda2-program-args RET
```
and add a new argument by inserting a new string
```
-i.
```
Then, apply the setting.
-}
module README where
------------------------------------------------------------------------------
-- Examples using macro
------------------------------------------------------------------------------
-- Datatypes and functions are generated through tactics using
-- `unquoteDecl` and `unquoteDecl data`.
-- * Running examples in section 2, 3 and 4.
import Examples.WithMacros.Acc
-- * Other examples
import Examples.WithMacros.W
import Examples.WithMacros.Nat
import Examples.WithMacros.List
import Examples.WithMacros.BST
import Examples.WithMacros.STLC
------------------------------------------------------------------------------
-- Main framework
------------------------------------------------------------------------------
-- * Section 2.1, only used to compare with the classic approach of DGP
-- but not used in our framework.
import Generics.Description.FixedPoint
-- * Section 3
import Generics.Description
import Generics.Telescope
-- * Section 4
import Generics.Algebra
import Generics.Recursion
-- * Section 5
import Generics.Reflection
import Generics.Reflection.Telescope
import Generics.Reflection.Datatype
import Generics.Reflection.Connection
import Generics.Reflection.Uncurry
import Generics.Reflection.Recursion
-- * Section 6
import Generics.RecursionScheme
import Generics.Ornament
import Generics.SimpleContainer
------------------------------------------------------------------------------
-- Utilties
------------------------------------------------------------------------------
-- * A tactic for printing the definition of a given name.
import Utils.Reflection.Print
-- To inspect the definition of a datatype or a function called `x`, invoke
--
-- `print D` or `print F`
--
-- by pressing `Ctrl+C Ctrl+N` in agda mode, the definitions will be printed
-- to the debug buffer (*).
-- (*) To open the debug buffer, see the following instructions
-- according to your editor:
-- (1) For Emacs: select the *Agda Debug* buffer.
-- (2) For VS Code: execute Agda: Open Debug Buffer in the Command Palette.
------------------------------------------------------------------------------
-- A minimal prelude
------------------------------------------------------------------------------
import Prelude
------------------------------------------------------------------------------
-- Everything (else)
------------------------------------------------------------------------------
import Everything
import EverythingSafe