git.iko.soy/rowtype-yoga/purescript-native
on ea3e968 help sign in
24 lines 601 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 d1. (Data d1) => d1 -> m d1) -> d -> m d
22everywhereM' f x = do
23 y <- f x
24 gmapM (everywhereM' f) y