1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-19 09:29:44 +01:00
tensorflow-haskell/tensorflow-queue/tensorflow-queue.cabal
Judah Jacobson 2c5c879037 Introduce a MonadBuild class, and remove buildAnd. (#83)
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`.
2017-03-18 12:08:53 -07:00

52 lines
1.6 KiB
Text

name: tensorflow-queue
version: 0.1.0.0
synopsis: Basic access to TensorFlow queues.
description: Please see README.md
homepage: https://github.com/tensorflow/haskell#readme
license: Apache
author: TensorFlow authors
maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
library
hs-source-dirs: src
exposed-modules: TensorFlow.Queue
build-depends: proto-lens == 0.1.*
, base >= 4.7 && < 5
, bytestring
, lens-family
, containers
, tensorflow-proto == 0.1.*
, tensorflow-core-ops == 0.1.*
, tensorflow
, text
default-language: Haskell2010
Test-Suite QueueTest
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: QueueTest.hs
hs-source-dirs: tests
-- Uses multiple threads and blocks without this option.
ghc-options: -threaded
build-depends: HUnit
, base
, bytestring
, proto-lens
, lens-family
, google-shim
, tensorflow
, tensorflow-core-ops
, tensorflow-ops
, tensorflow-queue
, test-framework
, test-framework-hunit
, transformers
, vector
source-repository head
type: git
location: https://github.com/tensorflow/haskell