File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ New modules
64
64
* Added ` Reflection.Traversal ` for generic de Bruijn-aware traversals of reflected terms.
65
65
* Added ` Reflection.DeBruijn ` with weakening, strengthening and free variable operations
66
66
on reflected terms.
67
+ * Added ` Reflection.Universe ` defining a universe for the reflected syntax types.
67
68
68
69
Other major changes
69
70
-------------------
Original file line number Diff line number Diff line change
1
+ ------------------------------------------------------------------------
2
+ -- The Agda standard library
3
+ --
4
+ -- A universe for the types involved in the reflected syntax.
5
+ ------------------------------------------------------------------------
6
+
7
+ {-# OPTIONS --without-K --safe #-}
8
+
9
+ module Reflection.Universe where
10
+
11
+ open import Data.List.Base using (List)
12
+ open import Data.String.Base using (String)
13
+ open import Data.Product using (_×_)
14
+ open import Reflection.Argument using (Arg)
15
+ open import Reflection.Abstraction using (Abs)
16
+ open import Reflection.Term using (Term; Pattern; Sort; Clause)
17
+
18
+ data Univ : Set where
19
+ ⟨term⟩ : Univ
20
+ ⟨pat⟩ : Univ
21
+ ⟨sort⟩ : Univ
22
+ ⟨clause⟩ : Univ
23
+ ⟨list⟩ : Univ → Univ
24
+ ⟨arg⟩ : Univ → Univ
25
+ ⟨abs⟩ : Univ → Univ
26
+ ⟨named⟩ : Univ → Univ
27
+
28
+ pattern ⟨tel⟩ = ⟨list⟩ (⟨named⟩ (⟨arg⟩ ⟨term⟩))
29
+
30
+ ⟦_⟧ : Univ → Set
31
+ ⟦ ⟨term⟩ ⟧ = Term
32
+ ⟦ ⟨pat⟩ ⟧ = Pattern
33
+ ⟦ ⟨sort⟩ ⟧ = Sort
34
+ ⟦ ⟨clause⟩ ⟧ = Clause
35
+ ⟦ ⟨list⟩ k ⟧ = List ⟦ k ⟧
36
+ ⟦ ⟨arg⟩ k ⟧ = Arg ⟦ k ⟧
37
+ ⟦ ⟨abs⟩ k ⟧ = Abs ⟦ k ⟧
38
+ ⟦ ⟨named⟩ k ⟧ = String × ⟦ k ⟧
You can’t perform that action at this time.
0 commit comments