diff --git a/haskell-cabal.el b/haskell-cabal.el index 99a07e94..bd341376 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -515,9 +515,8 @@ PROCESS-TYPE determines the format of the returned target." (val (car (split-string (haskell-cabal-section-value section))))) (if (equal (downcase component-type) "library") - (let ((lib-target (if (eq 'stack-ghci process-type) - (concat package-name ":lib") - (concat "lib:" package-name)))) + (let* ((lib-name (or val (if (eq 'stack-ghci process-type) "lib" package-name))) + (lib-target (concat package-name ":" lib-name))) (push lib-target matches)) (push (concat (when (eq 'stack-ghci process-type) (concat package-name ":"))