summaryrefslogtreecommitdiff
path: root/src/Inky/Data/SnocList/Quantifiers.idr
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2024-11-12 16:44:31 +0000
committerGreg Brown <greg.brown01@ed.ac.uk>2024-11-12 16:44:31 +0000
commitecaf9deb4b1d2ce85617438e621690b2df3ea367 (patch)
treef7f347a847ca58668349ee44e1bf047bff385600 /src/Inky/Data/SnocList/Quantifiers.idr
parent66169116cbacff64950407086fd0d832516a5f21 (diff)
Add ability to desugar terms.
Remove `getChildren` construct---it's too niche for the core language.
Diffstat (limited to 'src/Inky/Data/SnocList/Quantifiers.idr')
-rw-r--r--src/Inky/Data/SnocList/Quantifiers.idr7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Inky/Data/SnocList/Quantifiers.idr b/src/Inky/Data/SnocList/Quantifiers.idr
index 73c6551..ac6287b 100644
--- a/src/Inky/Data/SnocList/Quantifiers.idr
+++ b/src/Inky/Data/SnocList/Quantifiers.idr
@@ -4,6 +4,8 @@ import public Data.SnocList.Quantifiers
import Data.List.Quantifiers
import Inky.Data.Irrelevant
+import Inky.Data.SnocList
+import Inky.Data.SnocList.Elem
import Inky.Decidable
public export
@@ -41,6 +43,11 @@ relevant [<] _ = [<]
relevant (sx :< x) prfs = relevant sx (tail prfs) :< Forget (head prfs)
public export
+tabulate : LengthOf sx -> (forall x. Elem x sx -> p x) -> All p sx
+tabulate Z f = [<]
+tabulate (S len) f = tabulate len (f . There) :< f Here
+
+public export
data Pairwise : (a -> a -> Type) -> SnocList a -> Type where
Lin : Pairwise r [<]
(:<) : Pairwise r sx -> All (flip r x) sx -> Pairwise r (sx :< x)