git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add ObjectConstructor traversal case
commit180d49174dfa682f890d5d2031ea15c73043a751 authorGary Burgess <gary.burgess@gmail.com> dateFri 6 Feb 2015, 21:00 (12 years ago) parentd5e647f
1 file changed+2−1
src/Language/PureScript/AST/Traversals.hs+2−1
src/Language/PureScript/AST/Traversals.hs+2−1
@@ -18,7 +18,7 @@ import Data.Monoid (Monoid(..), mconcat)
1818
1919import Control.Applicative
2020import Control.Monad
21−import Control.Arrow ((***), (+++))
21+import Control.Arrow ((***), (+++), second)
2222
2323import Language.PureScript.AST.Binders
2424import Language.PureScript.AST.Declarations
@@ -46,6 +46,7 @@ everywhereOnValues f g h = (f', g', h')
4646 g' (Parens v) = g (Parens (g' v))
4747 g' (ArrayLiteral vs) = g (ArrayLiteral (map g' vs))
4848 g' (ObjectLiteral vs) = g (ObjectLiteral (map (fmap g') vs))
49+ g' (ObjectConstructor vs) = g (ObjectConstructor (map (second (fmap g')) vs))
4950 g' (TypeClassDictionaryConstructorApp name v) = g (TypeClassDictionaryConstructorApp name (g' v))
5051 g' (Accessor prop v) = g (Accessor prop (g' v))
5152 g' (ObjectUpdate obj vs) = g (ObjectUpdate (g' obj) (map (fmap g') vs))