Skip to content

Commit

Permalink
Autoformatter is an entity that formats itself
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoikin committed Feb 9, 2025
1 parent 6642029 commit e43ca29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions core/src/Log.purs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ data LogVerbosity
= LogQuiet
| LogNormal
| LogVerbose

derive instance Eq LogVerbosity

-- | LogVeryVerbose -- TODO:we'll need to add timestamps, and locations, see https://stackoverflow.com/questions/45395369/
Expand Down
15 changes: 8 additions & 7 deletions docs-search/index/src/Docs/Search/IndexBuilder.purs
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ run cfg@{ log } = do

sequential $
parallel (writeIndex cfg index)
*> parallel (writeTypeIndex typeIndex)
*> parallel (writePackageInfo packageInfo)
*> parallel (writeModuleIndex moduleIndex)
*> parallel (patchDocs cfg)
*> parallel (copyAppFile cfg)
*> parallel (writeTypeIndex typeIndex)
*> parallel (writePackageInfo packageInfo)
*> parallel (writeModuleIndex moduleIndex)
*> parallel (patchDocs cfg)
*> parallel (copyAppFile cfg)

let
countOfDefinitions = Trie.size $ unwrap index
Expand Down Expand Up @@ -365,8 +365,9 @@ createDirectories { generatedDocs, die } = do
copyAppFile :: Config -> Aff Unit
copyAppFile { generatedDocs, die } = do
appFile <- liftEffect getDocsSearchAppPath
unlessM (fileExists appFile) $
die $
unlessM (fileExists appFile)
$ die
$
"Client-side app was not found at " <> appFile <> ".\n" <>
"Check your installation."
buffer <- readFile appFile
Expand Down
13 changes: 7 additions & 6 deletions src/Spago/Purs.purs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ printDocsFormat = case _ of
Ctags -> "ctags"
Etags -> "etags"

docs :: a.
{ root :: RootPath
, globs :: Set LocalPath
, format :: DocsFormat
, quiet :: Boolean
}
docs
:: a
. { root :: RootPath
, globs :: Set LocalPath
, format :: DocsFormat
, quiet :: Boolean
}
-> Spago (PursEnv a) (Either ExecaResult ExecaResult)
docs cfg = do
{ purs } <- ask
Expand Down

0 comments on commit e43ca29

Please sign in to comment.