Skip to content

cmc-msu-ai/ap-reflect

Repository files navigation

ap-reflect

Hackage package Build Status

Partial evaluation reflection a la simple-reflect.

Installation

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

Documentation

Haddock documentation is available at http://cmc-msu-ai.github.io/ap-reflect/doc/html/ap-reflect/

Usage

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

Contributors

  • Oleg Baev
  • Nickolay Kudasov

Contribution

Contact me (Oleg Baev): [email protected]