beautiful
build / build (push) Failing after 1m1s

This commit is contained in:
2026-07-17 01:34:13 -06:00
parent f09a63f11c
commit 85d34883a6
3 changed files with 142 additions and 95 deletions
+12
View File
@@ -29,6 +29,8 @@ module Gyehoek.Wasm
, defineType
, defineGlobal
, declare
, renderModule
, wat
)
where
@@ -65,6 +67,8 @@ import Data.Functor (void)
import Language.Haskell.TH.Quote (QuasiQuoter)
import Data.Data (Data)
import Data.Functor.Foldable (cata)
import Gyehoek.Sexp (sx)
import qualified Language.Sexp as SL
newtype Module = MkModule { inner :: Vector Sexp }
@@ -159,6 +163,11 @@ runGenMod =
execGenMod :: Eff (GenMod : es) a -> Eff es Module
execGenMod = fmap snd . runGenMod
renderModule :: Module -> Text
renderModule (MkModule ss) = Gyehoek.Sexp.format [sx|
(module ##{ss})
|]
-- SexpIso instances
@@ -185,3 +194,6 @@ expr :: QuasiQuoter
expr = Gyehoek.Sexp.makeSxs
[||MkExpr . V.fromList . (each . #inner %~ Gyehoek.Sexp.stripLocation)
. fmap (Gyehoek.Sexp.fromSexp @Instr) ||]
wat :: QuasiQuoter
wat = Gyehoek.Sexp.makeSx [|| id ||]