Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- traversalTool :: TypeName -> TypeName -> APITool
Documentation
traversalTool :: TypeName -> TypeName -> APITool Source #
Build a traversal of the root type (first argument) that updates
values of the second type, e.g. traversalTool Root Sub
produces
traverseSubRoot :: Applicative f => (Sub -> f Sub) -> Root -> f Root
along with similar functions for all the types nested inside Root
that depend on Sub
.
Note that types with custom representations will not have
traversals generated automatically: if required, these must be
defined manually in the same module as the call to traversalTool
,
otherwise the generated code will lead to scope errors.