Skip to content

Commit

Permalink
Make result match more lazy.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmikus committed Sep 23, 2024
1 parent c4c6fc5 commit cf0cf76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/haskell/web-service/src/Backend/Simala.hs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ evaluator inputs outputVars decls = do
Left err -> throwError $ InterpreterError $ "Failed to evaluate expression: " <> Simala.render err
Right () -> do
case evalTrace of
[(Right (VRecord outputs), trace)] -> do
((Right (VRecord outputs), trace) : _) -> do
outputsFn' <- traverse (\(k, v) -> fmap (k,) (simalaValToFnLiteral v)) outputs
-- Only keep the fields in the output that were actually requested.
-- If nothing was explicitly requested, we keep all outputs.
Expand Down

0 comments on commit cf0cf76

Please sign in to comment.