git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #735 from dylex/everywhere-once

Make everywhereOnValuesM only apply functions once at top level

commit98dbf6357c40f3fc6b5a902c2aedddc379636395 authorPhil Freeman <paf31@cantab.net> dateThu 27 Nov 2014, 16:36 (12 years ago) parentb7ef367f002d23
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