on master help sign in
Don't error on goto definition for another package (#1687)
210de4eNeil Mitchell
src/Development/IDE/Types/Options.hs+5
@@ -7,6 +7,7 @@
7module Development.IDE.Types.Options
7module Development.IDE.Types.Options
8 ( IdeOptions(..)
8 ( IdeOptions(..)
9 , IdePkgLocationOptions(..)
9 , IdePkgLocationOptions(..)
10+ , defaultIdePkgLocationOptions
10 ) where
11 ) where
11
12
12import Development.Shake
13import Development.Shake
@@ -38,3 +39,7 @@ data IdePkgLocationOptions = IdePkgLocationOptions
38 -- used to lookup settings like importDirs. For DAML, we place them in the package DB.
39 -- used to lookup settings like importDirs. For DAML, we place them in the package DB.
39 -- For cabal this could point somewhere in ~/.cabal/packages.
40 -- For cabal this could point somewhere in ~/.cabal/packages.
40 }
41 }
42+
43+defaultIdePkgLocationOptions :: IdePkgLocationOptions
44+defaultIdePkgLocationOptions = IdePkgLocationOptions f f
45+ where f _ _ = return Nothing
test/Demo.hs+1−1
@@ -59,7 +59,7 @@ main = do
59 ,optWriteIface = False
59 ,optWriteIface = False
60 ,optGhcSession = liftIO $ newSession' cradle
60 ,optGhcSession = liftIO $ newSession' cradle
61 ,optExtensions = ["hs"]
61 ,optExtensions = ["hs"]
62− ,optPkgLocationOpts = error "optPkgLocationOpts not implemented yet"
62+ ,optPkgLocationOpts = defaultIdePkgLocationOptions
63 ,optThreads = 0
63 ,optThreads = 0
64 ,optShakeProfiling = Nothing -- Just "output.html"
64 ,optShakeProfiling = Nothing -- Just "output.html"
65 }
65 }