copilot-core 0.2.2 → 0.2.3
raw patch · 2 files changed
+6/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
copilot-core.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: copilot-core-version: 0.2.2+version: 0.2.3 synopsis: An intermediate representation for Copilot. description: Intermediate representation for Copilot. Strictly follows Haskell 2010 except for universal
src/Copilot/Core/Interpret/Eval.hs view
@@ -339,18 +339,21 @@ Trigger { triggerGuard = e , triggerArgs = args- } = take k $ map tag (zip bs vs) ++ repeat Nothing -- there might be 0 args!+ } = map tag (zip bs vs) where tag :: (Bool, a) -> Maybe a tag (True, x) = Just x tag (False, _) = Nothing + -- Is the guard true? bs :: [Bool] bs = evalExprs_ k e strms + -- The argument outputs. vs :: [[Output]]- vs = transpose $ map evalUExpr args + vs = if null args then replicate k [] -- might be 0 args.+ else transpose $ map evalUExpr args evalUExpr :: UExpr -> [Output] evalUExpr (UExpr t e1) =