@@ -70,6 +70,7 @@ indRecToIndexed End = Indexed.End
70
70
indRecToIndexed Fail = Indexed . Fail
71
71
indRecToIndexed (Pure x) = Indexed . Pure x
72
72
indRecToIndexed (Ignore f def) = Indexed . Ignore (indRecToIndexed f) def
73
+ indRecToIndexed (Choice f1 f2) = Indexed . Choice (indRecToIndexed f1) (indRecToIndexed f2)
73
74
indRecToIndexed (Repeat len f) = Indexed . Repeat len (indRecToIndexed f)
74
75
indRecToIndexed (Tuple fs) = ? todo_indRecToIndexedTuple
75
76
indRecToIndexed (Pair f1 f2) = Indexed . Pair (indRecToIndexed f1) (indRecToIndexed f2)
85
86
indexedToIndRecFormat (MkFormat (Sing x) (Pure x)) = (Pure x ** Refl )
86
87
indexedToIndRecFormat (MkFormat () (Ignore f def)) with (indexedToIndRecFormatOf f)
87
88
_ | MkFormatOf f' = (Ignore f' def ** Refl )
89
+ indexedToIndRecFormat (MkFormat (Either _ _ ) (Choice f1 f2)) with (indexedToIndRecFormatOf f1, indexedToIndRecFormatOf f2)
90
+ _ | (MkFormatOf f1', MkFormatOf f2') = (Choice f1' f2' ** Refl )
88
91
indexedToIndRecFormat (MkFormat (Vect len _ ) (Repeat len f)) with (indexedToIndRecFormatOf f)
89
92
_ | MkFormatOf f' = (Repeat len f' ** Refl )
90
93
indexedToIndRecFormat (MkFormat (HVect reps) (Tuple fs)) =
@@ -103,6 +106,8 @@ mutual
103
106
indexedToIndRecFormatOf (Pure x) = MkFormatOf (Pure x)
104
107
indexedToIndRecFormatOf (Ignore f def) with (indexedToIndRecFormatOf f)
105
108
_ | MkFormatOf f' = MkFormatOf (Ignore f' def)
109
+ indexedToIndRecFormatOf (Choice f1 f2) with (indexedToIndRecFormatOf f1, indexedToIndRecFormatOf f2)
110
+ _ | (MkFormatOf f1', MkFormatOf f2') = MkFormatOf (Choice f1' f2')
106
111
indexedToIndRecFormatOf (Repeat len f) with (indexedToIndRecFormatOf f)
107
112
_ | MkFormatOf f' = MkFormatOf (Repeat len f')
108
113
indexedToIndRecFormatOf (Tuple fs) =
0 commit comments