Skip to content

Commit f1a2c99

Browse files
committed
[haskell indexer facebookincubator#1] Add --arg=ARG
For passing flags to hie-indexer
1 parent 31c7aa4 commit f1a2c99

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

glean/lang/haskell/Glean/Indexer/Haskell.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ data Haskell = Haskell
2424
{ haskellBinary :: FilePath
2525
, haskellGhc :: Maybe FilePath
2626
, haskellSrcs :: [FilePath]
27+
, haskellArgs :: [String]
2728
}
2829

2930
options :: Parser Haskell
@@ -42,6 +43,9 @@ options = do
4243
" (otherwise read existing .hie files)")
4344
)
4445
haskellSrcs <- many (strOption (long "src"))
46+
haskellArgs <- many (strOption (
47+
long "arg" <> metavar "ARG" <>
48+
help "argument to pass to hie-indexer"))
4549
return Haskell{..}
4650

4751
indexer :: Indexer Haskell
@@ -77,7 +81,7 @@ indexer =
7781
, "--repo-hash"
7882
, "${TEST_REPO_HASH}"
7983
, hieDir
80-
] <> [ "--src=" <> f | f <- haskellSrcs ]
84+
] <> [ "--src=" <> f | f <- haskellSrcs ] <> haskellArgs
8185
, extDerivePredicates = [
8286
"hs.OccNameLowerCase",
8387
"hs.SourceModule"

0 commit comments

Comments
 (0)