From a50bf2a9077bebd746d447b62d58e506462cadd9 Mon Sep 17 00:00:00 2001 From: flupe Date: Thu, 6 Nov 2025 16:22:45 +0100 Subject: [PATCH 1/2] Require dependencies when inductives are in types --- src/Agda2Lambox/Compile/Type.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Agda2Lambox/Compile/Type.hs b/src/Agda2Lambox/Compile/Type.hs index 42d6ff8..b045dfd 100644 --- a/src/Agda2Lambox/Compile/Type.hs +++ b/src/Agda2Lambox/Compile/Type.hs @@ -143,6 +143,7 @@ compileTypeTerm = \case -- if it's an inductive, we only apply the parameters else if isDataOrRecDef def then do + lift $ requireDef q ind <- liftTCM $ toInductive q ([],) . foldl' LBox.TApp (LBox.TInd ind) <$> compileElims (take (getInductiveParams def) es) From 3e470f1f34c26d0383e612c760bb99544e60f49c Mon Sep 17 00:00:00 2001 From: flupe Date: Fri, 7 Nov 2025 17:44:58 +0100 Subject: [PATCH 2/2] early support for user input --- demo/index.html | 104 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 89 insertions(+), 15 deletions(-) diff --git a/demo/index.html b/demo/index.html index 13ffa6a..d43f034 100644 --- a/demo/index.html +++ b/demo/index.html @@ -27,7 +27,7 @@ margin: 0; padding: 0; border: none; - +fieldset {margin-top: .5rem;} + + fieldset {margin-top: .5rem;} } pre { overflow-y: scroll; @@ -47,6 +47,18 @@

agda2lambox

+ + +
+ + + + +
+
+ Output - +
+
+ Function +