mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-26 21:09:44 +01:00
Depend on a newer proto-lens and remove orphan Ord instances. (#146)
proto-lens-0.2.2.0 generates Ord instances for all message types, so we can remove the orphan instances we previously added. Dependends on proto-lens-protoc-0.2.2.1 or newer due to google/proto-lens#113.
This commit is contained in:
parent
79d8d7edea
commit
56038ba27e
6 changed files with 7 additions and 58 deletions
10
stack.yaml
10
stack.yaml
|
@ -16,11 +16,11 @@ packages:
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- snappy-framing-0.1.1
|
- snappy-framing-0.1.1
|
||||||
- snappy-0.2.0.2
|
- snappy-0.2.0.2
|
||||||
- proto-lens-protobuf-types-0.2.1.0
|
# TODO: Remove these once the new versions are in lts-9.
|
||||||
# TODO: Remove these once the new versions are in lts-8.
|
- proto-lens-protobuf-types-0.2.2.0
|
||||||
- proto-lens-0.2.1.0
|
- proto-lens-0.2.2.0
|
||||||
- proto-lens-descriptors-0.2.1.0
|
- proto-lens-descriptors-0.2.2.0
|
||||||
- proto-lens-protoc-0.2.1.0
|
- proto-lens-protoc-0.2.2.1
|
||||||
|
|
||||||
# For Mac OS X, whose linker doesn't use this path by default
|
# For Mac OS X, whose linker doesn't use this path by default
|
||||||
# unless you run `xcode-select --install`.
|
# unless you run `xcode-select --install`.
|
||||||
|
|
|
@ -56,8 +56,8 @@ library
|
||||||
, Proto.Tensorflow.Core.Util.MemmappedFileSystem
|
, Proto.Tensorflow.Core.Util.MemmappedFileSystem
|
||||||
, Proto.Tensorflow.Core.Util.SavedTensorSlice
|
, Proto.Tensorflow.Core.Util.SavedTensorSlice
|
||||||
, Proto.Tensorflow.Core.Util.TestLog
|
, Proto.Tensorflow.Core.Util.TestLog
|
||||||
build-depends: proto-lens == 0.2.*
|
build-depends: proto-lens >= 0.2.2 && < 0.3
|
||||||
, proto-lens-protoc >= 0.2.1 && < 0.3
|
, proto-lens-protoc >= 0.2.2.1 && < 0.3
|
||||||
, proto-lens-protobuf-types == 0.2.*
|
, proto-lens-protobuf-types == 0.2.*
|
||||||
, base >= 4.7 && < 5
|
, base >= 4.7 && < 5
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
|
@ -91,7 +91,6 @@ import Proto.Tensorflow.Core.Framework.NodeDef
|
||||||
, op
|
, op
|
||||||
)
|
)
|
||||||
|
|
||||||
import TensorFlow.Orphans ()
|
|
||||||
import TensorFlow.Output
|
import TensorFlow.Output
|
||||||
|
|
||||||
newtype Unique = Unique Int
|
newtype Unique = Unique Int
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
-- Copyright 2016 TensorFlow authors.
|
|
||||||
--
|
|
||||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
-- you may not use this file except in compliance with the License.
|
|
||||||
-- You may obtain a copy of the License at
|
|
||||||
--
|
|
||||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
--
|
|
||||||
-- Unless required by applicable law or agreed to in writing, software
|
|
||||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
-- See the License for the specific language governing permissions and
|
|
||||||
-- limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
{-# LANGUAGE StandaloneDeriving #-}
|
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
|
||||||
-- Orphan instances for certain proto messages/enums, used internally.
|
|
||||||
-- TODO(judahjacobson): consider making proto-lens generate some or all of
|
|
||||||
-- these automatically; or, alternately, make new Haskell datatypes.
|
|
||||||
module TensorFlow.Orphans() where
|
|
||||||
|
|
||||||
import Proto.Tensorflow.Core.Framework.AttrValue
|
|
||||||
( AttrValue(..)
|
|
||||||
, AttrValue'ListValue(..)
|
|
||||||
, NameAttrList(..)
|
|
||||||
)
|
|
||||||
import Proto.Tensorflow.Core.Framework.NodeDef
|
|
||||||
( NodeDef(..))
|
|
||||||
import Proto.Tensorflow.Core.Framework.ResourceHandle
|
|
||||||
( ResourceHandle(..))
|
|
||||||
import Proto.Tensorflow.Core.Framework.Tensor
|
|
||||||
(TensorProto(..))
|
|
||||||
import Proto.Tensorflow.Core.Framework.TensorShape
|
|
||||||
(TensorShapeProto(..), TensorShapeProto'Dim(..))
|
|
||||||
import Proto.Tensorflow.Core.Framework.Types (DataType(..))
|
|
||||||
|
|
||||||
deriving instance Ord AttrValue
|
|
||||||
deriving instance Ord AttrValue'ListValue
|
|
||||||
deriving instance Ord DataType
|
|
||||||
deriving instance Ord NameAttrList
|
|
||||||
deriving instance Ord NodeDef
|
|
||||||
deriving instance Ord ResourceHandle
|
|
||||||
deriving instance Ord TensorProto
|
|
||||||
deriving instance Ord TensorShapeProto
|
|
||||||
deriving instance Ord TensorShapeProto'Dim
|
|
|
@ -44,7 +44,6 @@ import Lens.Family2.Unchecked (lens)
|
||||||
import Proto.Tensorflow.Core.Framework.AttrValue (AttrValue(..))
|
import Proto.Tensorflow.Core.Framework.AttrValue (AttrValue(..))
|
||||||
import Data.Default (def)
|
import Data.Default (def)
|
||||||
import TensorFlow.Types (Attribute, attrLens)
|
import TensorFlow.Types (Attribute, attrLens)
|
||||||
import TensorFlow.Orphans ()
|
|
||||||
|
|
||||||
-- | A type of graph node which has no outputs. These nodes are
|
-- | A type of graph node which has no outputs. These nodes are
|
||||||
-- valuable for causing side effects when they are run.
|
-- valuable for causing side effects when they are run.
|
||||||
|
|
|
@ -35,11 +35,8 @@ library
|
||||||
, TensorFlow.Tensor
|
, TensorFlow.Tensor
|
||||||
, TensorFlow.Types
|
, TensorFlow.Types
|
||||||
other-modules: TensorFlow.Internal.Raw
|
other-modules: TensorFlow.Internal.Raw
|
||||||
, TensorFlow.Orphans
|
|
||||||
build-tools: c2hs
|
build-tools: c2hs
|
||||||
build-depends: proto-lens == 0.2.*
|
build-depends: proto-lens == 0.2.*
|
||||||
-- Used by the custom Setup script (for the test-suite).
|
|
||||||
, proto-lens-protoc == 0.2.*
|
|
||||||
, tensorflow-proto == 0.1.*
|
, tensorflow-proto == 0.1.*
|
||||||
, base >= 4.7 && < 5
|
, base >= 4.7 && < 5
|
||||||
, async
|
, async
|
||||||
|
|
Loading…
Reference in a new issue