git.iko.soy/rowtype-yoga/purescript-native
on 558cd4e help sign in
24 lines 597 B history raw
1-----------------------------------------------------------------------------
2--
3-- Module : Data.Generics.Extras
4-- Copyright : (c) Phil Freeman 2013
5-- License : MIT
6--
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
9-- Portability :
10--
11-- |
12--
13-----------------------------------------------------------------------------
15{-# LANGUAGE Rank2Types #-}
17module Data.Generics.Extras where
19import Data.Data
21everywhereM' :: (Monad m, Data d) => (forall d. (Data d) => d -> m d) -> d -> m d
22everywhereM' f x = do
23 y <- f x
24 gmapM (everywhereM' f) y