clash-lib-1.8.4: Clash: a functional hardware description language - As a library

Copyright | (C) 2012-2016 University of Twente 2021 QBayLogic B.V.
License | BSD2 (see the file LICENSE)
Maintainer | QBayLogic B.V. <devops@qbaylogic.com>
Safe Haskell | None
Language | Haskell2010

Clash.Rewrite.Combinators

Description

Rewriting combinators and traversals

Synopsis

- allR :: Monad m => Transform m -> Transform m
- (!->) :: Rewrite m -> Rewrite m -> Rewrite m
- (>-!) :: Rewrite m -> Rewrite m -> Rewrite m
- (>-!->) :: Monad m => Transform m -> Transform m -> Transform m
- (>->) :: Monad m => Transform m -> Transform m -> Transform m
- bottomupR :: Monad m => Transform m -> Transform m
- repeatR :: Rewrite m -> Rewrite m
- topdownR :: Rewrite m -> Rewrite m

# Documentation

allR Source #

Arguments

:: Monad m |
=> Transform m | The transformation to apply to the subtrees
-> Transform m |

Apply a transformation on the subtrees of an term

(!->) :: Rewrite m -> Rewrite m -> Rewrite m infixr 5 Source #

Only apply the second transformation if the first one succeeds.

(>-!) :: Rewrite m -> Rewrite m -> Rewrite m infixr 5 Source #

Only apply the second transformation if the first one fails.

(>-!->) :: Monad m => Transform m -> Transform m -> Transform m infixr 6 Source #

Apply two transformations in succession, and perform a deepseq in between.

(>->) :: Monad m => Transform m -> Transform m -> Transform m infixr 6 Source #

Apply two transformations in succession

bottomupR :: Monad m => Transform m -> Transform m Source #

Apply a transformation in a bottomup traversal

repeatR :: Rewrite m -> Rewrite m Source #

Keep applying a transformation until it fails.

topdownR :: Rewrite m -> Rewrite m Source #

Apply a transformation in a topdown traversal