branch: elpa/haskell-tng-mode commit b1122e429307e508f335341a30779cd1e926593b Author: Tseen She <ts33n....@gmail.com> Commit: Tseen She <ts33n....@gmail.com>
allow users to use unsupported build tools --- haskell-tng-compile.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/haskell-tng-compile.el b/haskell-tng-compile.el index b468553..bd527a3 100644 --- a/haskell-tng-compile.el +++ b/haskell-tng-compile.el @@ -66,6 +66,11 @@ (defvar-local haskell-tng-compile:command nil) (defvar-local haskell-tng-compile:alt "cabal v2-clean") +(defvar haskell-tng-compile:dominating-file + (rx (| "cabal.project" "cabal.project.local" "cabal.project.freeze" + (: (+ any) ".cabal") + "package.yaml" "stack.yaml"))) + (defun haskell-tng-compile (&optional edit-command) "`compile' specialised to Haskell: @@ -99,9 +104,7 @@ will cause the subsequent call to prompt." (when-let (default-directory (haskell-tng:locate-dominating-file - (rx (| "cabal.project" "cabal.project.local" "cabal.project.freeze" - (: (+ any) ".cabal") - "package.yaml" "stack.yaml")))) + haskell-tng-compile:dominating-file)) (compilation-start command 'haskell-tng-compilation-mode