From 911286892b780a45f4036a87815d12d9fce75d2a Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Wed, 30 Oct 2024 05:46:42 -0700 Subject: [PATCH] handle pkgname = None case --- haskell/compile.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haskell/compile.bzl b/haskell/compile.bzl index 5771cc3a7..d72811df3 100644 --- a/haskell/compile.bzl +++ b/haskell/compile.bzl @@ -446,9 +446,10 @@ def _common_compile_module_args( direct_deps_info: list[HaskellLibraryInfoTSet], pkgname: str | None = None, ) -> CommonCompileModuleArgs: + command = cmd_args(ghc_wrapper) command.add("--ghc", haskell_toolchain.compiler) - if haskell_toolchain.use_persistent_workers: + if haskell_toolchain.use_persistent_workers and pkgname: worker_target_id = pkgname command.add("--worker-target-id", worker_target_id) # Some rules pass in RTS (e.g. `+RTS ... -RTS`) options for GHC, which can't