Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 3409779

Browse files
committed
s/OnlyPaths/IncludePaths
1 parent 42028a8 commit 3409779

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Semantic/CLI.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ parseCommand = command "parse" (info parseArgumentsParser (progDesc "Generate pa
115115
<*> option shaReader (long "sha" <> help "The commit SHA1 to read from")
116116
<*> ( ExcludePaths <$> many (option str (long "exclude" <> short 'x' <> help "Paths to exclude"))
117117
<|> ExcludeFromHandle <$> flag' stdin (long "exclude-stdin" <> help "Exclude paths given to stdin")
118-
<|> OnlyPaths <$> many (option str (long "only" <> help "Only include the specified paths"))
119-
<|> OnlyPathsFromHandle <$> flag' stdin (long "only-stdin" <> help "Include only the paths given to stdin"))
118+
<|> IncludePaths <$> many (option str (long "only" <> help "Only include the specified paths"))
119+
<|> IncludePathsFromHandle <$> flag' stdin (long "only-stdin" <> help "Include only the paths given to stdin"))
120120
<|> FilesFromPaths <$> some (argument filePathReader (metavar "FILES..."))
121121
<|> pure (FilesFromHandle stdin)
122122
pure $ Task.readBlobs filesOrStdin >>= renderer
@@ -134,8 +134,8 @@ tsParseCommand = command "ts-parse" (info tsParseArgumentsParser (progDesc "Gene
134134
<*> option shaReader (long "sha" <> help "The commit SHA1 to read from")
135135
<*> ( ExcludePaths <$> many (option str (long "exclude" <> short 'x' <> help "Paths to exclude"))
136136
<|> ExcludeFromHandle <$> flag' stdin (long "exclude-stdin" <> help "Exclude paths given to stdin")
137-
<|> OnlyPaths <$> many (option str (long "only" <> help "Only include the specified paths"))
138-
<|> OnlyPathsFromHandle <$> flag' stdin (long "only-stdin" <> help "Include only the paths given to stdin"))
137+
<|> IncludePaths <$> many (option str (long "only" <> help "Only include the specified paths"))
138+
<|> IncludePathsFromHandle <$> flag' stdin (long "only-stdin" <> help "Include only the paths given to stdin"))
139139
<|> FilesFromPaths <$> some (argument filePathReader (metavar "FILES..."))
140140
<|> pure (FilesFromHandle stdin)
141141
pure $ Task.readBlobs filesOrStdin >>= AST.runASTParse format

src/Semantic/Task/Files.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ data Destination = ToPath FilePath | ToHandle (Handle 'IO.WriteMode)
4545
data PathFilter
4646
= ExcludePaths [FilePath]
4747
| ExcludeFromHandle (Handle 'IO.ReadMode)
48-
| OnlyPaths [FilePath]
49-
| OnlyPathsFromHandle (Handle 'IO.ReadMode)
48+
| IncludePaths [FilePath]
49+
| IncludePathsFromHandle (Handle 'IO.ReadMode)
5050

5151
-- | An effect to read/write 'Blob's from 'Handle's or 'FilePath's.
5252
data Files (m :: * -> *) k
@@ -84,8 +84,8 @@ instance (Member (Error SomeException) sig, Member Catch sig, MonadIO m, Carrier
8484
Read (FromDir dir) k -> rethrowing (readBlobsFromDir dir) >>= k
8585
Read (FromGitRepo path sha (ExcludePaths excludePaths)) k -> rethrowing (readBlobsFromGitRepo path sha excludePaths mempty) >>= k
8686
Read (FromGitRepo path sha (ExcludeFromHandle handle)) k -> rethrowing (readPathsFromHandle handle >>= (\x -> readBlobsFromGitRepo path sha x mempty)) >>= k
87-
Read (FromGitRepo path sha (OnlyPaths onlyPaths)) k -> rethrowing (readBlobsFromGitRepo path sha mempty onlyPaths) >>= k
88-
Read (FromGitRepo path sha (OnlyPathsFromHandle h)) k -> rethrowing (readPathsFromHandle h >>= readBlobsFromGitRepo path sha mempty) >>= k
87+
Read (FromGitRepo path sha (IncludePaths includePaths)) k -> rethrowing (readBlobsFromGitRepo path sha mempty includePaths) >>= k
88+
Read (FromGitRepo path sha (IncludePathsFromHandle h)) k -> rethrowing (readPathsFromHandle h >>= readBlobsFromGitRepo path sha mempty) >>= k
8989
Read (FromPathPair paths) k -> rethrowing (runBothWith readFilePair paths) >>= k
9090
Read (FromPairHandle handle) k -> rethrowing (readBlobPairsFromHandle handle) >>= k
9191
ReadProject rootDir dir language excludeDirs k -> rethrowing (readProjectFromPaths rootDir dir language excludeDirs) >>= k

0 commit comments

Comments
 (0)