From 817b7530c1562d60bf37a190a015f18d45356787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Tue, 30 Jun 2026 18:42:40 -0600 Subject: [PATCH] cps --- app/Gyehoek/CPS/Convert.hs | 8 +++++++- repl | 0 2 files changed, 7 insertions(+), 1 deletion(-) mode change 100644 => 100755 repl diff --git a/app/Gyehoek/CPS/Convert.hs b/app/Gyehoek/CPS/Convert.hs index 7796bce..2945f54 100644 --- a/app/Gyehoek/CPS/Convert.hs +++ b/app/Gyehoek/CPS/Convert.hs @@ -5,6 +5,7 @@ module Gyehoek.CPS.Convert import Gyehoek.CPS.Syntax import Gyehoek.Scheme.Syntax qualified as Scm import Gyehoek.GenSym +import Data.List.NonEmpty (NonEmpty((:|))) import Effectful import Control.Monad.Cont qualified as Cont @@ -28,4 +29,9 @@ convert (Scm.ExpPrim p) k = r <- gensym' "r" ExpPrim p' [r] . pure <$> k (ValVar r) -convert _ _ = _ +convert (Scm.ExpApply f xs) k = + telescope (convert @es) (f:|xs) \(f':|xs') -> do + _ + _ + +convert _ k = _ diff --git a/repl b/repl old mode 100644 new mode 100755