Neil Mitchell schrieb:
Uniplate might be the answer you are looking for -
Thanks for the pointer!
Must a package import Uniplate, if it uses Uniplate generics, or is it a
preprocessor like I sketched?
Uniplate is simple (only multi parameter type classes, and even then
only in a very simple usage), fast (one of the fastest generics
libraries) and concise (probably the most concise generics library).
It's also not as powerful as most of the other generics libraries, but
I find it does about 98% of the generics tasks I need. Uniplate is
used extensively in virtually all my tools, for example HLint.
As an example, I guess your function returns all the Int's embedded
within a data type, at any level?
I abstracted the Bin example from GHC's generic extension introduction:
Haskell-Cafe mailing list