mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
8ea325348a
commit
9ea1cd195c
|
@ -40,8 +40,7 @@ glob pat ignore dir action = runContT (callCC $ \exit -> go exit dir) pure
|
|||
unless continue (exit ())
|
||||
else do
|
||||
isD <- liftIO $ doesDirectoryExist fn
|
||||
if not isD then exit ()
|
||||
else do
|
||||
when isD do
|
||||
content <- liftIO (try @_ @IOError $ listDirectory fn)
|
||||
<&> fromRight mempty
|
||||
-- TODO: memory-hungry
|
||||
|
|
|
@ -867,6 +867,11 @@ internalEntries = do
|
|||
pure $ if a == b then mkBool True else mkBool False
|
||||
_ -> throwIO (BadFormException @c nil)
|
||||
|
||||
entry $ bindMatch "length" $ \case
|
||||
[ListVal es] -> pure $ mkInt (length es)
|
||||
[StringLike es] -> pure $ mkInt (length es)
|
||||
_ -> pure $ mkInt 0
|
||||
|
||||
entry $ bindMatch "nil?" $ \case
|
||||
[ListVal []] -> pure $ mkBool True
|
||||
_ -> pure $ mkBool False
|
||||
|
|
Loading…
Reference in New Issue