git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #2276 from ianbollinger/everywhereOnTypesTopDown

Fixes Language.PureScript.Types.everywhereOnTypesTopDown

commit6719bde9f51516940f021bf514cb9a5b0c266bf2 authorPhil Freeman <paf31@cantab.net> dateMon 15 Aug 2016, 09:23 (10 years ago) parent9b34d87029c4d9
4 files changed+6−2
CONTRIBUTORS.md+1 examples/docs/src/ExplicitTypeSignatures.purs+2 src/Language/PureScript/Types.hs+2−2 tests/TestDocs.hs+1
CONTRIBUTORS.md+1
@@ -30,6 +30,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
3030- [@felixSchl](https://github.com/felixSchl) (Felix Schlitter) My existing contributions and all future contributions until further notice are Copyright Felix Schlitter, 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).
3131- [@garyb](https://github.com/garyb) (Gary Burgess) My existing contributions and all future contributions until further notice are Copyright Gary Burgess, 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).
3232- [@hdgarrood](https://github.com/hdgarrood) (Harry Garrood) My existing contributions and all future contributions until further notice are Copyright Harry Garrood, 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).
33+- [@ianbollinger](https://github.com/ianbollinger) (Ian D. Bollinger) My existing contributions and all future contributions until further notice are Copyright Ian D. Bollinger, 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).
3334- [@ilovezfs](https://github.com/ilovezfs) - My existing contributions and all future contributions until further notice are Copyright ilovezfs, and are licensed to the owners and users of the PureScript compiler project under the terms of the MIT license
3435- [@izgzhen](https://github.com/izgzhen) (Zhen Zhang) My existing contributions and all future contributions until further notice are Copyright Zhen Zhang, 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).
3536- [@jacereda](https://github.com/jacereda) (Jorge Acereda) My existing contributions and all future contributions until further notice are Copyright Jorge Acereda, 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).
examples/docs/src/ExplicitTypeSignatures.purs+2
@@ -14,3 +14,5 @@ anInt = 0
1414
1515-- This should infer a type.
1616aNumber = 1.0
17+
18+foreign import nestedForAll :: forall c. (forall a b. c)
src/Language/PureScript/Types.hs+2−2
@@ -257,8 +257,8 @@ everywhereOnTypesTopDown f = go . f
257257 go (PrettyPrintFunction t1 t2) = PrettyPrintFunction (go (f t1)) (go (f t2))
258258 go (PrettyPrintObject t) = PrettyPrintObject (go (f t))
259259 go (PrettyPrintForAll args t) = PrettyPrintForAll args (go (f t))
260− go (BinaryNoParensType t1 t2 t3) = BinaryNoParensType (f (go t1)) (f (go t2)) (f (go t3))
261− go (ParensInType t) = ParensInType (f (go t))
260+ go (BinaryNoParensType t1 t2 t3) = BinaryNoParensType (go (f t1)) (go (f t2)) (go (f t3))
261+ go (ParensInType t) = ParensInType (go (f t))
262262 go other = f other
263263
264264everywhereOnTypesM :: Monad m => (Type -> m Type) -> Type -> m Type
tests/TestDocs.hs+1
@@ -278,6 +278,7 @@ testCases =
278278 [ ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "explicit" (ShowFn (hasTypeVar "something"))
279279 , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "anInt" (ShowFn (P.tyInt ==))
280280 , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "aNumber" (ShowFn (P.tyNumber ==))
281+ , ValueShouldHaveTypeSignature (n "ExplicitTypeSignatures") "nestedForAll" (renderedType "forall c. (forall a b. c)")
281282 ])
282283
283284 , ("ConstrainedArgument",