git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Make everywhereOnValuesM only apply functions once at top level

The traversal functions already pass their results through the functions. There should be no need to do it again.

commitf002d23337c0370496ce3f3d37f456e7508fcc7c authorDylan Simon <dylan@dylex.net> dateThu 27 Nov 2014, 00:54 (12 years ago) parentf82c9e6
1 file changed+1−1
src/Language/PureScript/AST/Traversals.hs+1−1
src/Language/PureScript/AST/Traversals.hs+1−1
@@ -135,7 +135,7 @@ everywhereOnValuesM :: (Functor m, Applicative m, Monad m) =>
135135 (Expr -> m Expr) ->
136136 (Binder -> m Binder) ->
137137 (Declaration -> m Declaration, Expr -> m Expr, Binder -> m Binder)
138−everywhereOnValuesM f g h = (f' <=< f, g' <=< g, h' <=< h)
138+everywhereOnValuesM f g h = (f', g', h')
139139 where
140140 f' (DataBindingGroupDeclaration ds) = (DataBindingGroupDeclaration <$> mapM f' ds) >>= f
141141 f' (ValueDeclaration name nameKind bs val) = (ValueDeclaration name nameKind <$> mapM h' bs <*> eitherM (mapM (pairM g' g')) g' val) >>= f