From 6ad9de28cbc6a091f4effcc84918d1fda8a7ea6b 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 6a2ec8c3e3..e2f9aad09f 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -62,6 +62,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 @@ -98,6 +99,7 @@ import Ide.Plugin.Ormolu as Ormolu import Ide.Plugin.Brittany as Brittany #endif import Ide.Plugin.Pragmas as Pragmas +import Data.Void (vacuous) -- --------------------------------------------------------------------- @@ -443,7 +445,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 eopts <- cradleToSessionOpts cradle cfp print eopts case eopts of