1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-23 03:19: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:
Judah Jacobson 2017-08-02 22:47:55 -07:00 committed by Greg Steuck
parent 79d8d7edea
commit 56038ba27e
6 changed files with 7 additions and 58 deletions

View file

@ -16,11 +16,11 @@ packages:
extra-deps:
- snappy-framing-0.1.1
- snappy-0.2.0.2
- proto-lens-protobuf-types-0.2.1.0
# TODO: Remove these once the new versions are in lts-8.
- proto-lens-0.2.1.0
- proto-lens-descriptors-0.2.1.0
- proto-lens-protoc-0.2.1.0
# TODO: Remove these once the new versions are in lts-9.
- proto-lens-protobuf-types-0.2.2.0
- proto-lens-0.2.2.0
- proto-lens-descriptors-0.2.2.0
- proto-lens-protoc-0.2.2.1
# For Mac OS X, whose linker doesn't use this path by default
# unless you run `xcode-select --install`.

View file

@ -56,8 +56,8 @@ library
, Proto.Tensorflow.Core.Util.MemmappedFileSystem
, Proto.Tensorflow.Core.Util.SavedTensorSlice
, Proto.Tensorflow.Core.Util.TestLog
build-depends: proto-lens == 0.2.*
, proto-lens-protoc >= 0.2.1 && < 0.3
build-depends: proto-lens >= 0.2.2 && < 0.3
, proto-lens-protoc >= 0.2.2.1 && < 0.3
, proto-lens-protobuf-types == 0.2.*
, base >= 4.7 && < 5
default-language: Haskell2010

View file

@ -91,7 +91,6 @@ import Proto.Tensorflow.Core.Framework.NodeDef
, op
)
import TensorFlow.Orphans ()
import TensorFlow.Output
newtype Unique = Unique Int

View file

@ -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

View file

@ -44,7 +44,6 @@ import Lens.Family2.Unchecked (lens)
import Proto.Tensorflow.Core.Framework.AttrValue (AttrValue(..))
import Data.Default (def)
import TensorFlow.Types (Attribute, attrLens)
import TensorFlow.Orphans ()
-- | A type of graph node which has no outputs. These nodes are
-- valuable for causing side effects when they are run.

View file

@ -35,11 +35,8 @@ library
, TensorFlow.Tensor
, TensorFlow.Types
other-modules: TensorFlow.Internal.Raw
, TensorFlow.Orphans
build-tools: c2hs
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.*
, base >= 4.7 && < 5
, async