From 801edb8db03770e8bbf9e510fc402b16532ba1ea Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Fri, 24 Jan 2020 16:02:19 -0500 Subject: [PATCH] Some more tweaks --- src/Data/Blob.hs | 4 ++-- src/Semantic/CLI.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Blob.hs b/src/Data/Blob.hs index 9f628293a..4aca40307 100644 --- a/src/Data/Blob.hs +++ b/src/Data/Blob.hs @@ -49,8 +49,8 @@ type File = Analysis.File.File Language -- | The source, path information, and language of a file read from disk. data Blob = Blob - { blobSource :: Source -- ^ The UTF-8 encoded source text of the blob. - , blobFile :: File -- ^ Path/language information for this blob. + { blobSource :: Source -- ^ The UTF-8 encoded source text of the blob. + , blobFile :: File -- ^ Path/language information for this blob. } deriving (Show, Eq) blobLanguage :: Blob -> Language diff --git a/src/Semantic/CLI.hs b/src/Semantic/CLI.hs index 9874dbd20..bf1e95c0a 100644 --- a/src/Semantic/CLI.hs +++ b/src/Semantic/CLI.hs @@ -153,8 +153,8 @@ graphCommand = command "graph" (info graphArgumentsParser (progDesc "Compute a g <$> ( Just <$> some (strArgument (metavar "FILES...")) <|> flag' Nothing (long "stdin" <> help "Read a list of newline-separated paths to analyze from stdin.")) makeReadProjectFromPathsTask maybePaths = do - ePaths <- maybeM (liftIO (many getLine)) maybePaths - let paths = rights (Path.parse <$> ePaths) + strPaths <- maybeM (liftIO (many getLine)) maybePaths + let paths = rights (Path.parse <$> strPaths) blobs <- traverse readBlobFromPath paths case paths of (x:_) -> pure $! Project (Path.toString (Path.takeDirectory x)) blobs (Language.forPath x) mempty