format trailing module comments

This commit is contained in:
Nathan Faubion 2021-04-10 12:59:47 -07:00
parent 6270b6b52c
commit fab3e52e97
2 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,7 @@ main = do
let opts = ChildProcess.defaultExecSyncOptions { cwd = Just tmpPath }
let genCmd = "node -e \"require('" <> cwdPath <> "/output/Main/index.js').main()\" generate-operators '.spago/*/*/src/**/*.purs'"
writeTextFile UTF8 (Path.concat [ tmpPath, "spago.dhall" ]) defaultSpagoDhall
writeTextFile UTF8 (Path.concat [ tmpPath, "spago.dhall" ]) defaultSpagoDhall
_ <- ChildProcess.execSync "spago install" opts
output <- Buffer.toString UTF8 =<< ChildProcess.execSync genCmd opts

View File

@ -159,6 +159,7 @@ formatModule conf (Module { header: ModuleHeader header, body: ModuleBody body }
, joinWithMap break (formatImportDecl conf) header.imports
, joinWithMap break (formatDecl conf) body.decls
, foldr (formatComment leadingLineComment) mempty body.trailingComments
]
formatExport :: forall e a. Format (Export e) e a