This change adds a class that both `Build` and `Session` are instances of:
class MonadBuild m where
build :: Build a -> m a
All stateful ops (generated and manually written) now have a signature that returns
an instance of `MonadBuild` (rather than just `Build`). For example:
assign_ :: (MonadBuild m, TensorType t)
=> Tensor Ref t -> Tensor v t -> m (Tensor Ref t)
This lets us remove a bunch of spurious calls to `build` in user code. It also
lets us replace the pattern `buildAnd run foo` with the simpler pattern `foo >>= run`
(or `run =<< foo`, which is sometimes nicer when foo is a complicated expression).
I went ahead and deleted `buildAnd` altogether since it seems to lead to
confusion; in particular a few tests had `buildAnd run . pure` which is
actually equivalent to just `run`.
I'm not sure why, but in some cases it seems linking only works if *both* the
.so and the .dylib are present in /usr/local/lib. This may be due to a quirk
of how Bazel builds the library, and/or how ghc/stack load the library.
* Sorted test names.
* Don't require a terminal to run tests.
Should resolve "the input device is not a TTY" problem with Jenkins.
* Added build indicator to README.md.
* Fixed up URL.