git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Exhaustive pattern match on JSAnnot. (#2432)

* Exhaustive pattern match on JSAnnot. Also append to contributors file. * Bump LTS versions for stack.

commitae98dfafa9a20f93e26f1fc0e6bca813f50ea1f8 authorTim McGilchrist <timmcgil@gmail.com> dateSat 26 Nov 2016, 09:20 (10 years ago) parentf81b9ca
4 files changed+5−2
CONTRIBUTORS.md+1 src/Language/PureScript/Bundle.hs+2 stack-ghc-8.0.yaml+1−1 stack.yaml+1−1
CONTRIBUTORS.md+1
@@ -78,6 +78,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
7878- [@sztupi](https://github.com/sztupi) (Attila Sztupak) My existing contributions and all future contributions until further notice are Copyright Attila Sztupak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
7979- [@taku0](https://github.com/taku0) - My existing contributions and all future contributions until further notice are Copyright taku0, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
8080- [@tfausak](https://github.com/tfausak) (Taylor Fausak) My existing contributions and all future contributions until further notice are Copyright Taylor Fausak, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
81+- [@tmcgilchrist](https://github.com/tmcgilchrist) (Tim McGilchrist) My existing contributions and all future contributions until further notice are Copyright Tim McGilchrist, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
8182- [@trofi](https://github.com/trofi) (Sergei Trofimovich) My existing contributions and all future contributions until further notice are Copyright Sergei Trofimovich, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
8283- [@utkarshkukreti](https://github.com/utkarshkukreti) (Utkarsh Kukreti) My existing contributions and all future contributions until further notice are Copyright Utkarsh Kukreti, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
8384- [@vkorablin](https://github.com/vkorablin) (Vladimir Korablin) - My existing contributions and all future contributions until further notice are Copyright Vladimir Korablin, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license.
src/Language/PureScript/Bundle.hs+2
@@ -534,6 +534,7 @@ codeGen optionsMainModule optionsNamespace ms = renderToString (JSAstProgram (p
534534 where
535535 squash JSNoAnnot = JSAnnot (TokenPn 0 0 2) []
536536 squash (JSAnnot pos ann) = JSAnnot (keepCol pos) (map splat ann)
537+ squash JSAnnotSpace = JSAnnot (TokenPn 0 0 2) []
537538
538539 splat (CommentA pos s) = CommentA (keepCol pos) s
539540 splat (WhiteSpace pos w) = WhiteSpace (keepCol pos) w
@@ -589,6 +590,7 @@ codeGen optionsMainModule optionsNamespace ms = renderToString (JSAstProgram (p
589590
590591 appendAnn a JSNoAnnot = JSAnnot tokenPosnEmpty [a]
591592 appendAnn a (JSAnnot _ anns) = JSAnnot tokenPosnEmpty (a:anns ++ [WhiteSpace tokenPosnEmpty " "])
593+ appendAnn a JSAnnotSpace = JSAnnot tokenPosnEmpty [a]
592594
593595 runMain :: String -> [JSStatement]
594596 runMain mn =
stack-ghc-8.0.yaml+1−1
@@ -1,4 +1,4 @@
1−resolver: nightly-2016-07-19
1+resolver: lts-7.9
22packages:
33- '.'
44extra-deps:
stack.yaml+1−1
@@ -1,3 +1,3 @@
1−resolver: lts-6.10
1+resolver: lts-6.25
22packages:
33- '.'