clash-lib-0.2.2: CAES Language for Synchronous Hardware - As a Library

Safe HaskellNone
LanguageHaskell2010

CLaSH.Rewrite.Combinators

Description

Rewriting combinators and traversals

Synopsis

Documentation

allR Source

Arguments

:: forall m . (Functor m, Monad m, Fresh m) 
=> Bool

Freshen variable references in abstracted terms

-> Transform m

The transformation to apply to the subtrees

-> Transform m 

Apply a transformation on the subtrees of an term

(>->) :: Monad m => Transform m -> Transform m -> Transform m Source

Apply two transformations in succession

topdownR :: (Fresh m, Functor m, Monad m) => Transform m -> Transform m Source

Apply a transformation in a topdown traversal

unsafeTopdownR :: (Fresh m, Functor m, Monad m) => Transform m -> Transform m Source

Apply a transformation in a topdown traversal. Doesn't freshen bound variables

bottomupR :: (Fresh m, Functor m, Monad m) => Transform m -> Transform m Source

Apply a transformation in a bottomup traversal

unsafeBottomupR :: (Fresh m, Functor m, Monad m) => Transform m -> Transform m Source

Apply a transformation in a bottomup traversal. Doesn't freshen bound variables

(!->) :: Monad m => Rewrite m -> Rewrite m -> Rewrite m Source

Only apply the second transformation if the first one succeeds.

(>-!) :: Monad m => Rewrite m -> Rewrite m -> Rewrite m Source

Only apply the second transformation if the first one fails.

repeatR :: Monad m => Rewrite m -> Rewrite m Source

Keep applying a transformation until it fails.

whenR :: Monad m => ([CoreContext] -> Term -> m Bool) -> Transform m -> Transform m Source