diff options
author | Sven Tennie <sven.tennie@gmail.com> | 2021-01-17 17:01:50 +0100 |
---|---|---|
committer | Sven Tennie <sven.tennie@gmail.com> | 2021-01-17 17:01:50 +0100 |
commit | 7be595e397b237b2bbdb7692cf53445651a764c6 (patch) | |
tree | aa69c1ac51cd6978c3b0898a42b069141c168dde | |
parent | 0dba78410887ffc3d219639081e284ef7b67560a (diff) | |
download | haskell-wip/utils_ide_support.tar.gz |
Add IDE support for several utilswip/utils_ide_support
These depend on the GHC version to be built, so we can not simply
create a hie.yaml and use the boot-GHC.
-rwxr-xr-x | hadrian/hie-bios | 4 | ||||
-rw-r--r-- | hadrian/src/Rules/ToolArgs.hs | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/hadrian/hie-bios b/hadrian/hie-bios index 4def2e8823..dcf36963b5 100755 --- a/hadrian/hie-bios +++ b/hadrian/hie-bios @@ -1,7 +1,7 @@ #! /usr/bin/env bash +HADRIAN_DIR=`dirname "$0"` # When run, this program will output a list of arguments which are necessary to # load the GHC library component into GHCi. The program is used by `ghcide` in # order to automatically set up the correct GHC API session for a project. -TERM=dumb CABFLAGS=-v0 $PWD/hadrian/build-cabal tool:$1 -q --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT - +TERM=dumb CABFLAGS=-v0 $HADRIAN_DIR/build-cabal tool:$1 -q -j --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT diff --git a/hadrian/src/Rules/ToolArgs.hs b/hadrian/src/Rules/ToolArgs.hs index 8277d580fa..dffbf33d38 100644 --- a/hadrian/src/Rules/ToolArgs.hs +++ b/hadrian/src/Rules/ToolArgs.hs @@ -34,6 +34,7 @@ import System.Directory (canonicalizePath) -- options needed to compile the specific file. toolArgsTarget :: Rules () toolArgsTarget = do + -- TODO: magic `(drop 5 s)` phonys (\s -> if "tool:" `isPrefixOf` s then Just (toolRuleBody (drop 5 s)) else Nothing) toolRuleBody :: FilePath -> Action () @@ -98,7 +99,17 @@ toolTargets = [ array , stm , time , unlit - , xhtml ] + , xhtml + , checkApiAnnotations + , checkPpr + , compareSizes + , deriveConstants + , genapply + , genprimopcode + , ghcPkg + , hpc + , hpcBin + , runGhc ] -- | Create a mapping from files to which component it belongs to. dirMap :: Action [(FilePath, (Package, [String]))] @@ -125,4 +136,3 @@ dirMap = do cd <- readContextData c ids <- liftIO $ mapM canonicalizePath [pkgPath p </> i | i <- srcDirs cd] return $ map (,(p, modules cd ++ otherModules cd)) ids - |