Lines Matching refs:Uniplate

1 # Boilerplate Removal with Uniplate [![Hackage version](https://img.shields.io/hackage/v/uniplate.s…
3 …g these operations, the Uniplate library focuses on a conceptually simpler generic concept. A more…
5 Uniplate is a simple, concise and fast generics library. To expand on that sentence:
8 2. Uniplate is the simplest generics library. Using Uniplate is within the reach of all Haskell pro…
9 3. Uniplate is more concise than any other generics library.
10 4. Uniplate is fast, not always the absolute fastest, but massively faster than many generics libra…
11 5. Uniplate is also less powerful than some other generics libraries, but if it does the job, you s…
13 The Uniplate library can be installed with the standard sequence of cabal commands:
20 1. Using Uniplate
22 3. Making Uniplate Faster
28 ## Using Uniplate
30 To demonstrate the facilities of Uniplate, we use a simple arithmetic type:
36 <b>import Data.Generics.Uniplate.Data</b>
47 In this definition, the Uniplate specific bits are bolded. The three extra parts are:
49 * `import Data.Generics.Uniplate.Data`, this module contains all the Uniplate functions and definit…
50 …ing (Data,Typeable)`, this deriving clause automatically adds the necessary instances for Uniplate.
53Uniplate implementation. The SYB implementation is compatible with the other implementations, but …
55Uniplate library defines two classes, `Uniplate` and `Biplate`, along with a number of functions. …
60 universe :: Uniplate on => on -> [on]
70 Here the only Uniplate method being used is `universe`, which when given a tree returns the root of…
77 transform :: Uniplate on => (on -> on) -> on -> on
89 Here the Uniplate method being used is `transform`, which applies the given function to all the chi…
104 para :: Uniplate on => (on -> [res] -> res) -> on -> res
121 transformM :: (Monad m, Uniplate on) => (on -> m on) -> on -> m on
144 contexts :: Uniplate on => on -> [(on, on -> on)]
162 rewrite :: Uniplate on => (on -> Maybe on) -> on -> on
175 transformM :: (Monad m, Uniplate on) => (on -> m on) -> on -> m on -- transform
176 rewriteM :: (Monad m, Uniplate on) => (on -> m (Maybe on)) -> on -> m on -- rewrite
184 children :: Uniplate on => on -> [on] -- universe
186 holes :: Uniplate on => on -> [(on, on -> on)] -- contexts
193 If we need to evaluate an expression in our language, the answer is simple, don't use Uniplate! The…
207 …he operations defined in Uniplate have a corresponding Biplate instance. Typically the operations …
224 ## Making Uniplate Faster
226 To make Uniplate faster import `Data.Generics.Uniplate.Direct` and write your instances by hand.
230 * [Geniplate](http://hackage.haskell.org/package/geniplate), by Lennart Augustsson, Uniplate compat…
231 …oring Uniplate](http://www-ps.informatik.uni-kiel.de/~sebf/projects/traversal.html), by Sebastian …
232 * [Uniplate for Curry](http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/Traversal.html), by Sebast…
233 * [Uniplate for ML (in MLton)](https://github.com/MLton/mltonlib/blob/master/com/ssh/generic/unstab…
234 * [Uniplate for data types with embedded monads](http://tomschrijvers.blogspot.com/2007/11/extensio…
235 ….haskell.org/package/multiplate), by Russell O'Connor, similar ideas to Uniplate but with a very d…
236 * [Infer.Toys](https://infers.github.io/Infers/Infers.Toys.html) provides a Uniplate-inspired `Elem…