Skip to content

Commit 6ad9de2

Browse files
committed
Use cabal-helper cradle instead implicit one
1 parent 0a2be76 commit 6ad9de2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exe/Main.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ import HIE.Bios.Environment (addCmdOpts, makeDynFlagsAbsolut
6262
import HIE.Bios.Types
6363
import HscTypes (HscEnv(..), ic_dflags)
6464
import qualified Language.Haskell.LSP.Core as LSP
65+
import Ide.Cradle
6566
import Ide.Logger
6667
import Ide.Plugin
6768
import Ide.Plugin.Config
@@ -98,6 +99,7 @@ import Ide.Plugin.Ormolu as Ormolu
9899
import Ide.Plugin.Brittany as Brittany
99100
#endif
100101
import Ide.Plugin.Pragmas as Pragmas
102+
import Data.Void (vacuous)
101103

102104

103105
-- ---------------------------------------------------------------------
@@ -443,7 +445,7 @@ loadSession dir = do
443445
-- throwing an async exception
444446
void $ forkIO $ do
445447
putStrLn $ "Consulting the cradle for " <> show file
446-
cradle <- maybe (loadImplicitCradle $ addTrailingPathSeparator dir) loadCradle hieYaml
448+
cradle <- maybe (cabalHelperCradle cfp) (fmap vacuous . loadCradle) hieYaml
447449
eopts <- cradleToSessionOpts cradle cfp
448450
print eopts
449451
case eopts of

0 commit comments

Comments
 (0)