aboutsummaryrefslogtreecommitdiff
path: root/src/CHAD/AST.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-11-11 23:56:47 +0100
committerTom Smeding <tom@tomsmeding.com>2025-11-11 23:56:47 +0100
commitdc61318a22e3492774ab6f6345c9a369222ef2f6 (patch)
tree6b7b0bd1d194666b3ba6eb5f85e620bf850fee69 /src/CHAD/AST.hs
parentcd135319f65f40a554d864b2a878a4ef44043a98 (diff)
User-facing API suggestion
Diffstat (limited to 'src/CHAD/AST.hs')
-rw-r--r--src/CHAD/AST.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CHAD/AST.hs b/src/CHAD/AST.hs
index 2f4b5c2..be7f95e 100644
--- a/src/CHAD/AST.hs
+++ b/src/CHAD/AST.hs
@@ -139,6 +139,9 @@ data Expr x env t where
EError :: x a -> STy a -> String -> Expr x env a
deriving instance (forall ty. Show (x ty)) => Show (Expr x env t)
+-- | A (well-typed, well-scoped) expression using De Bruijn indices. The full
+-- 'Expr' type is parametrised on an indexed type of "additional info" (@x@);
+-- 'Ex' sets this to nothing.
type Ex = Expr (Const ())
ext :: Const () a