From 5253891b0089dea2eb4d58a179acdf912d96b9a0 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 22 Nov 2017 00:24:14 +0100 Subject: [PATCH 1/2] Cherrypick #3148 --- CONTRIBUTORS.md | 1 + src/Language/PureScript/Pretty/Common.hs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 818378b926..45dadbd5bf 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -116,6 +116,7 @@ If you would prefer to use different terms, please use the section below instead | [@drets](https://github.com/drets) | Dmytro Rets | [MIT license](http://opensource.org/licenses/MIT) | | [@bjornmelgaaard](https://github.com/BjornMelgaard) | Sergey Homa | [MIT license](http://opensource.org/licenses/MIT) | | [@sloosch](https://github.com/sloosch) | Simon Looschen | [MIT license](http://opensource.org/licenses/MIT) | +| [@thimoteus](https://github.com/Thimoteus) | thimoteus | [MIT license](http://opensource.org/licenses/MIT) | ### Contributors using Modified Terms diff --git a/src/Language/PureScript/Pretty/Common.hs b/src/Language/PureScript/Pretty/Common.hs index 32b5ea2608..b7280232e7 100644 --- a/src/Language/PureScript/Pretty/Common.hs +++ b/src/Language/PureScript/Pretty/Common.hs @@ -13,6 +13,7 @@ import Data.List (elemIndices, intersperse) import Data.Monoid ((<>)) import Data.Text (Text) import qualified Data.Text as T +import Data.Char (isUpper) import Language.PureScript.AST (SourcePos(..), SourceSpan(..)) import Language.PureScript.Parser.Lexer (isUnquotedKey, reservedPsNames) @@ -148,7 +149,10 @@ prettyPrintMany f xs = do objectKeyRequiresQuoting :: Text -> Bool objectKeyRequiresQuoting s = - s `elem` reservedPsNames || not (isUnquotedKey s) + s `elem` reservedPsNames || not (isUnquotedKey s) || startsUppercase s where + startsUppercase label = case T.uncons label of + Just (c, _) -> isUpper c + _ -> False -- | Place a box before another, vertically when the first box takes up multiple lines. before :: Box -> Box -> Box From 5e6fd287d4f6d65b09eb251d80012e97bfed7063 Mon Sep 17 00:00:00 2001 From: Christoph Date: Wed, 22 Nov 2017 00:25:14 +0100 Subject: [PATCH 2/2] Update Glob library, fixes #3055 (#3156) * Update Glob library, fixes #3055 Also update the Stackage snapshot so that we get the latest version of Glob, which includes memory usage and performance fixes. * Reduce timeout threshold to help avoid CI failures --- package.yaml | 2 +- stack.yaml | 2 +- travis/build.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.yaml b/package.yaml index 52b66f0da1..c89f0f75b4 100644 --- a/package.yaml +++ b/package.yaml @@ -52,7 +52,7 @@ dependencies: - file-embed - filepath - fsnotify >=0.2.1 - - Glob >=0.7 && <0.9 + - Glob >=0.9 && <0.10 - haskeline >=0.7.0.0 - http-client >=0.4.30 && <0.6.0 - http-types diff --git a/stack.yaml b/stack.yaml index df22368d47..4336168e7a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2017-09-10 +resolver: nightly-2017-11-20 packages: - '.' extra-deps: diff --git a/travis/build.sh b/travis/build.sh index 679612883b..5005a5f9ed 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -5,7 +5,7 @@ STACK="stack --no-terminal --jobs=1" # Setup & install dependencies or abort ret=0 -$TIMEOUT 40m $STACK --install-ghc build \ +$TIMEOUT 30m $STACK --install-ghc build \ --only-dependencies --test --haddock \ || ret=$? case "$ret" in