From fab3e52e973f329c21d7337971dfb780c70a5284 Mon Sep 17 00:00:00 2001 From: Nathan Faubion Date: Sat, 10 Apr 2021 12:59:47 -0700 Subject: [PATCH] format trailing module comments --- script/GenerateDefaultOperatorsModule.purs | 2 +- src/PureScript/CST/Tidy.purs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/script/GenerateDefaultOperatorsModule.purs b/script/GenerateDefaultOperatorsModule.purs index 72eb436..07debbd 100644 --- a/script/GenerateDefaultOperatorsModule.purs +++ b/script/GenerateDefaultOperatorsModule.purs @@ -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 diff --git a/src/PureScript/CST/Tidy.purs b/src/PureScript/CST/Tidy.purs index 5f4034c..c4162bf 100644 --- a/src/PureScript/CST/Tidy.purs +++ b/src/PureScript/CST/Tidy.purs @@ -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