From 0aa97ddd0097d1bffb0d9373a42673ed60e8b2fe Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 28 Apr 2020 01:03:35 +0200 Subject: [PATCH] Use cabal-helper cradle instead implicit one --- exe/Main.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exe/Main.hs b/exe/Main.hs index 37c6eafc4a8..a49ecdb6de9 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -61,6 +61,7 @@ import HIE.Bios.Environment (addCmdOpts, makeDynFlagsAbsolut import HIE.Bios.Types import HscTypes (HscEnv(..), ic_dflags) import qualified Language.Haskell.LSP.Core as LSP +import Ide.Cradle import Ide.Logger import Ide.Plugin import Ide.Plugin.Config @@ -97,6 +98,7 @@ import Ide.Plugin.Ormolu as Ormolu import Ide.Plugin.Brittany as Brittany #endif import Ide.Plugin.Pragmas as Pragmas +import Data.Void (vacuous) -- --------------------------------------------------------------------- @@ -437,7 +439,7 @@ loadSession dir = do -- throwing an async exception void $ forkIO $ do putStrLn $ "Consulting the cradle for " <> show file - cradle <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle hieYaml + cradle <- maybe (cabalHelperCradle cfp) (fmap vacuous . loadCradle) hieYaml opts <- cradleToSessionOpts cradle cfp print opts (cs, res)<- session (hieYaml, toNormalizedFilePath' cfp, opts)