Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/Language/PureScript/Pretty/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2017-09-10
resolver: nightly-2017-11-20
packages:
- '.'
extra-deps:
Expand Down
2 changes: 1 addition & 1 deletion travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down