Copyright | (c) Kimiyuki Onaka 2021 |
---|---|
License | Apache License 2.0 |
Maintainer | kimiyuki95@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
\[ \newcommand\int{\mathbf{int}} \newcommand\bool{\mathbf{bool}} \newcommand\list{\mathbf{list}} \]
Synopsis
- run :: (MonadAlpha m, MonadError Error m) => Program -> m Program
- rule :: (MonadAlpha m, MonadError Error m) => RewriteRule m
- reduceCumulativeSum :: (MonadAlpha m, MonadError Error m) => RewriteRule m
- reduceMin :: MonadAlpha m => RewriteRule m
Documentation
run :: (MonadAlpha m, MonadError Error m) => Program -> m Program Source #
internal rules
rule :: (MonadAlpha m, MonadError Error m) => RewriteRule m Source #
reduceCumulativeSum :: (MonadAlpha m, MonadError Error m) => RewriteRule m Source #
reduceCumulativeSum
converts combinations of cumulative sums and array assignments to segment trees.
reduceMin :: MonadAlpha m => RewriteRule m Source #
reduceFromMin
uses segment trees from accumulation of min/max which are not reducible to cumulative sums.
TODO: implement this