From 7ce7009786ac5cfc3722ac2419d9f05dbe0a1094 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Fri, 20 Oct 2023 18:10:17 +0100 Subject: [PATCH] Clear Stan suggestion; use `fromMaybe mempty` not `fold` --- .stan.toml | 6 ------ src/Stack/Build/Execute.hs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.stan.toml b/.stan.toml index 43dff16d18..2d55ac7837 100644 --- a/.stan.toml +++ b/.stan.toml @@ -121,12 +121,6 @@ scope = "all" type = "Exclude" -# Anti-pattern: Foldable methods on possibly error-prone structures -[[check]] - id = "STAN-0207" - scope = "all" - type = "Exclude" - # Anti-pattern: Slow 'length' for Text # On Windows [[check]] diff --git a/src/Stack/Build/Execute.hs b/src/Stack/Build/Execute.hs index f06297e91d..939158212b 100644 --- a/src/Stack/Build/Execute.hs +++ b/src/Stack/Build/Execute.hs @@ -1554,7 +1554,7 @@ withSingleContext ActionContext {..} ee@ExecuteEnv {..} task@Task {..} allDeps m (sinkWithTimestamps prefixWithTimestamps h) (sinkWithTimestamps prefixWithTimestamps h) OTConsole mprefix -> - let prefix = fold mprefix + let prefix = fromMaybe mempty mprefix in void $ sinkProcessStderrStdout (toFilePath exeName) fullArgs