diff options
author | JasperVanDerJeugt <> | 2020-09-18 17:29:00 (GMT) |
---|---|---|
committer | hdiff <hdiff@hdiff.luite.com> | 2020-09-18 17:29:00 (GMT) |
commit | 11083cc9f8f7efa260993d0e9dc9ed9bceed1756 (patch) | |
tree | 631b7507646c2b80f15c2118f0702aefc75d8fce | |
parent | bd610864ffd4c5bde551c47b74409b4817f5aa70 (diff) |
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | lib/Patat/Eval.hs | 8 | ||||
-rw-r--r-- | patat.cabal | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8a821..ce9bb6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +- 0.8.6.1 (2020-09-18) + * Fix issue with laziness for evaluted code blocks, they should only be + evaluated when we actually want to show them + * Bump stack resolver to `lts-16.9` + - 0.8.6.0 (2020-09-11) * Allow evaluating code blocks (see README for more info) * Refactor implementation of fragments diff --git a/lib/Patat/Eval.hs b/lib/Patat/Eval.hs index 5b3b539..1fc6141 100644 --- a/lib/Patat/Eval.hs +++ b/lib/Patat/Eval.hs @@ -61,10 +61,10 @@ evalInstruction settings instr = case instr of -------------------------------------------------------------------------------- evalBlock :: EvalSettingsMap -> Pandoc.Block -> IO [Instruction Pandoc.Block] evalBlock settings orig@(Pandoc.CodeBlock attr@(_, classes, _) txt) - | [s@EvalSettings {..}] <- lookupSettings classes settings = - unsafeInterleaveIO $ do - EvalResult {..} <- evalCode s txt - let out = case erExitCode of + | [s@EvalSettings {..}] <- lookupSettings classes settings = do + out <- unsafeInterleaveIO $ do + EvalResult {..} <- evalCode s txt + pure $ case erExitCode of ExitSuccess -> erStdout ExitFailure i -> evalCommand <> ": exit code " <> T.pack (show i) <> "\n" <> diff --git a/patat.cabal b/patat.cabal index 47da073..3072481 100644 --- a/patat.cabal +++ b/patat.cabal @@ -1,5 +1,5 @@ Name: patat -Version: 0.8.6.0 +Version: 0.8.6.1 Synopsis: Terminal-based presentations using Pandoc Description: Terminal-based presentations using Pandoc. License: GPL-2 |