Partial evaluation reflection a la simple-reflect.
You can install the ap-reflect
from Hackage:
$ cabal install ap-reflect
or directly from the repository:
$ git clone https://github.com/cmc-msu-ai/ap-reflect
$ cd ap-reflect
$ cabal install
For some possibilities of using this library
you may need to install simple-reflect
.
It is available from
Hackage.
Install it, by typing:
cabal install simple-reflect
Haddock documentation is available at http://cmc-msu-ai.github.io/ap-reflect/doc/html/ap-reflect/
For example:
let (.+) = makeBinOp "+" (+)
mapM_ print . reductions $ (.+) -$- Just a -*- Just b
Result:
(+) <$> Just a <*> Just b
Just (a +) <*> Just b
Just (a + b)
You can find another examples of using this library at https://github.com/cmc-msu-ai/ap-reflect/tree/master/examples
- Oleg Baev
- Nickolay Kudasov
Contact me (Oleg Baev): [email protected]