Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
walk :: (Data a, Data b) => (a -> a) -> b -> b Source
Apply a transformation bottom-up to every node of a parsed document. This can be used, for example, to transform specially marked code blocks to highlighted code or images. Here is a simple example that promotes the levels of headers:
promoteHeaders :: Doc -> Doc promoteHeaders = walk promoteHeader where promoteHeader (Header n ils) = Header (n+1) ils promoteHeader x = x
module Cheapskate.Types