Copyright | (c) Kimiyuki Onaka 2021 |
---|---|
License | Apache License 2.0 |
Maintainer | kimiyuki95@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- run :: (MonadAlpha m, MonadError Error m) => Program -> m Program
- rule :: MonadAlpha m => RewriteRule m
Documentation
run :: (MonadAlpha m, MonadError Error m) => Program -> m Program Source #
run
introduces cumulative sums.
Examples
Before:
sum (fun i -> a[i]) (range n)
After:
let b = scanl (+) 0 a in b[n]
internal rules
rule :: MonadAlpha m => RewriteRule m Source #