idk ^w^
build / build (push) Failing after 14m11s

This commit is contained in:
2026-07-20 01:56:53 -06:00
parent 57defed077
commit 2f471ae4b1
10 changed files with 260 additions and 106 deletions
+8 -3
View File
@@ -22,6 +22,7 @@ module Gyehoek.Scheme.Syntax
, free
, subst
, getName
, scm
)
where
@@ -47,6 +48,7 @@ import Data.Functor.Foldable hiding (fold)
import Data.HashSet (HashSet)
import qualified Data.HashSet as HS
import Data.Foldable (fold)
import Language.Haskell.TH.Quote (QuasiQuoter)
newtype Name = MkName { inner :: Text }
@@ -70,7 +72,7 @@ data Prim e
| PrimWrite e
| PrimZeroP e
| PrimNewline
deriving (Show, Generic, Functor, Foldable, Traversable, Data)
deriving (Show, Generic, Functor, Foldable, Traversable, Data, Eq)
instance Each (Prim e) (Prim e') e e'
@@ -80,7 +82,7 @@ data Lit
| LitBool Bool
| LitString Text
| LitQuote Sexp
deriving (Show, Generic, Data)
deriving (Show, Generic, Data, Eq)
pattern Void :: Lit
pattern Void = LitNil
@@ -105,7 +107,7 @@ data Sexp
= SexpCons Sexp Sexp
| SexpSymbol Text
| SexpLit Lit
deriving (Show, Generic, Data)
deriving (Show, Generic, Data, Eq)
data CommandOrDef
= Command Exp
@@ -228,6 +230,9 @@ instance SexpIso CommandOrDef where
-- utilities
scm :: QuasiQuoter
scm = Gyehoek.Sexp.makeSx [|| Gyehoek.Sexp.fromSexp @Exp ||]
free :: Exp -> HashSet Name
free = cata \case
ExpVarF x -> HS.singleton x