Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 721425b

Browse files
authored
Merge pull request #1551 from fendor/default-fallback-cradle
Fallback to direct cradle if no project context can be found
2 parents 7f08240 + 72e138e commit 721425b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

hie-plugin-api/Haskell/Ide/Engine/Cradle.hs

+8-2
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,14 @@ cabalHelperCradle file = do
432432
return
433433
Cradle { cradleRootDir = cwd
434434
, cradleOptsProg =
435-
CradleAction { actionName = "Cabal-Helper-None"
436-
, runCradle = \_ _ -> return CradleNone
435+
CradleAction { actionName = "Direct"
436+
, runCradle = \_ _ ->
437+
return
438+
$ CradleSuccess
439+
ComponentOptions
440+
{ componentOptions = [file, fixImportDirs cwd "-i."]
441+
, componentDependencies = []
442+
}
437443
}
438444
}
439445
Just (Ex proj) -> do

0 commit comments

Comments
 (0)