@@ -70,6 +70,7 @@ indRecToIndexed End = Indexed.End
7070indRecToIndexed Fail = Indexed . Fail
7171indRecToIndexed (Pure x) = Indexed . Pure x
7272indRecToIndexed (Ignore f def) = Indexed . Ignore (indRecToIndexed f) def
73+ indRecToIndexed (Choice f1 f2) = Indexed . Choice (indRecToIndexed f1) (indRecToIndexed f2)
7374indRecToIndexed (Repeat len f) = Indexed . Repeat len (indRecToIndexed f)
7475indRecToIndexed (Tuple fs) = ? todo_indRecToIndexedTuple
7576indRecToIndexed (Pair f1 f2) = Indexed . Pair (indRecToIndexed f1) (indRecToIndexed f2)
8586 indexedToIndRecFormat (MkFormat (Sing x) (Pure x)) = (Pure x ** Refl )
8687 indexedToIndRecFormat (MkFormat () (Ignore f def)) with (indexedToIndRecFormatOf f)
8788 _ | 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 )
8891 indexedToIndRecFormat (MkFormat (Vect len _ ) (Repeat len f)) with (indexedToIndRecFormatOf f)
8992 _ | MkFormatOf f' = (Repeat len f' ** Refl )
9093 indexedToIndRecFormat (MkFormat (HVect reps) (Tuple fs)) =
@@ -103,6 +106,8 @@ mutual
103106 indexedToIndRecFormatOf (Pure x) = MkFormatOf (Pure x)
104107 indexedToIndRecFormatOf (Ignore f def) with (indexedToIndRecFormatOf f)
105108 _ | 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')
106111 indexedToIndRecFormatOf (Repeat len f) with (indexedToIndRecFormatOf f)
107112 _ | MkFormatOf f' = MkFormatOf (Repeat len f')
108113 indexedToIndRecFormatOf (Tuple fs) =
0 commit comments