1-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
2-- SPDX-License-Identifier: Apache-2.0
4{-# LANGUAGE RankNTypes #-}
7module Development.IDE.Types.Options
9 , IdePkgLocationOptions(..)
12import Development.IDE.UtilGHC
13import GHC hiding (parseModule, typecheckModule)
14import GhcPlugins as GHC hiding (fst3, (<>))
17data IdeOptions = IdeOptions
18 { optPreprocessor :: GHC.ParsedSource -> ([(GHC.SrcSpan, String)], GHC.ParsedSource)
19 , optRunGhcSession :: forall a. Maybe ParsedModule -> PackageDynFlags -> Ghc a -> IO a
20 -- ^ Setup a GHC session using a given package state. If a `ParsedModule` is supplied,
21 -- the import path should be setup for that module.
22 , optPkgLocationOpts :: IdePkgLocationOptions
23 , optWriteIface :: Bool
24 , optExtensions :: [String]
26 , optMbPackageName :: Maybe String
28 , optPackageDbs :: [FilePath]
29 , optHideAllPkgs :: Bool
30 , optPackageImports :: [(String, ModRenaming)]
33 , optShakeProfiling :: Maybe FilePath
37-- | The set of options used to locate files belonging to external packages.
38data IdePkgLocationOptions = IdePkgLocationOptions
39 { optLocateHieFile :: PackageConfig -> Module -> IO (Maybe FilePath)
40 -- ^ Locate the HIE file for the given module. The PackageConfig can be
41 -- used to lookup settings like importDirs.
42 , optLocateSrcFile :: PackageConfig -> Module -> IO (Maybe FilePath)
43 -- ^ Locate the source file for the given module. The PackageConfig can be
44 -- used to lookup settings like importDirs. For DAML, we place them in the package DB.
45 -- For cabal this could point somewhere in ~/.cabal/packages.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list