The pez package

PEZ is a generic zipper library. It uses lenses from the 'fclabels' package to
reference a "location" to move to in the zipper. The zipper is restricted to
types in the Typeable class, allowing the user to "move up" through complex data
structures such as mutually-recursive types.

Both the Typeable class and fclabels lenses can be derived in GHC, making it
easy for the programmer to use a zipper with a minimum of boilerplate.

First import the library, which brings in the Typeable and fclabels modules.
You will also want to enable a few extensions: