frenetic-lang/frenetic — pull request #342 by seliopou (2014-09-10 13:21:44+00:00)
Title: Low-level app interface abstracts over value tupe

This pull request changes the low-level `Raw_app` interface to allow applications not just policies, but arbitrary values. This is achieved by changing the type constructor to now take two parameters:

```ocaml
type ('r, 'a) Raw_app.t
```
...where the first is the context type that will get threaded through during event handling (it's something like the environment type in a Reader monad), and the second is the value type that the app will produce in response to events. By specializing `'a` to `policy`, you get the original `Raw_app.t` type.

The low-level interface now exposes two new functions for a more applicative-feeling API:

```ocaml
val lift : ('a -> 'b) -> ('r, 'a) t -> ('r, 'b) t
val ap : ?how:[`Sequential | `Parallel] -> ('r, 'a -> 'b) t -> ('r, 'a) t -> ('r, 'b) t
```

**Note** that this does not change the interface of `Async_NetKAT` at all.