This commit is contained in:
voidlizard 2025-03-03 13:25:43 +03:00
parent 1a1d04ea5c
commit 41c023de8c
1 changed files with 6 additions and 2 deletions

View File

@ -530,8 +530,8 @@ apply_ :: forall c m . ( IsContext c
apply_ s args = case s of
ListVal [SymbolVal "builtin:lambda", SymbolVal n] -> apply n args
ListVal (SymbolVal "builtin:closure" : what@(SymbolVal _) : free) -> do
apply_ what (free <> args)
ListVal (SymbolVal "builtin:closure" : e : free) -> do
apply_ e (free <> args)
SymbolVal "quasiquot" -> mkList <$> mapM (evalQQ mempty) args
SymbolVal "quasiquote" -> mkList <$> mapM (evalQQ mempty) args
@ -1088,6 +1088,10 @@ internalEntries = do
r <- mapM eval syn
pure $ lastDef nil r
entry $ bindMatch "curry" \case
[e1, e2] -> pure $ mkForm "builtin:closure" [e1, e2]
e -> throwIO (BadFormException @c (mkList e))
entry $ bindMatch "id" $ \case
[ e ] -> pure e
_ -> throwIO (BadFormException @C nil)