mirror of
https://github.com/tensorflow/haskell.git
synced 2024-06-02 11:03:34 +02:00
Added PureResult instances for tuples up to size twelve so that tensorflow-core-ops would compile.
This commit is contained in:
parent
aa28354614
commit
7210ff8be1
|
@ -114,6 +114,7 @@ blackList =
|
||||||
, "ParallelInterleaveDatasetV2"
|
, "ParallelInterleaveDatasetV2"
|
||||||
, "ParallelMapDataset"
|
, "ParallelMapDataset"
|
||||||
, "ParseSequenceExample"
|
, "ParseSequenceExample"
|
||||||
|
, "ParseSequenceExampleV2"
|
||||||
, "PartitionedCall"
|
, "PartitionedCall"
|
||||||
, "ReduceDataset"
|
, "ReduceDataset"
|
||||||
, "RemoteCall"
|
, "RemoteCall"
|
||||||
|
|
1
tensorflow-core-ops/third_party
Symbolic link
1
tensorflow-core-ops/third_party
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../third_party/tensorflow/
|
|
@ -98,6 +98,7 @@ data Attr a = Attr
|
||||||
-- | The type of an attribute.
|
-- | The type of an attribute.
|
||||||
data AttrType = AttrSingle AttrBaseType
|
data AttrType = AttrSingle AttrBaseType
|
||||||
| AttrList AttrBaseType
|
| AttrList AttrBaseType
|
||||||
|
| AttrFunc
|
||||||
deriving Eq
|
deriving Eq
|
||||||
|
|
||||||
data AttrBaseType = AttrBytes | AttrInt64 | AttrFloat | AttrBool
|
data AttrBaseType = AttrBytes | AttrInt64 | AttrFloat | AttrBool
|
||||||
|
@ -341,5 +342,6 @@ parseAttrType o = \case
|
||||||
"list(type)" -> AttrList AttrType
|
"list(type)" -> AttrList AttrType
|
||||||
"list(shape)" -> AttrList AttrShape
|
"list(shape)" -> AttrList AttrShape
|
||||||
"list(tensor)" -> AttrList AttrTensor
|
"list(tensor)" -> AttrList AttrTensor
|
||||||
|
"func" -> AttrFunc
|
||||||
t -> error $ "parseAttrType: unrecognized type " ++ show t
|
t -> error $ "parseAttrType: unrecognized type " ++ show t
|
||||||
++ " for op " ++ show (o ^. name)
|
++ " for op " ++ show (o ^. name)
|
||||||
|
|
|
@ -257,6 +257,106 @@ instance ( PureResult a1
|
||||||
<*> pureResult
|
<*> pureResult
|
||||||
<*> pureResult
|
<*> pureResult
|
||||||
|
|
||||||
|
instance ( PureResult a1
|
||||||
|
, PureResult a2
|
||||||
|
, PureResult a3
|
||||||
|
, PureResult a4
|
||||||
|
, PureResult a5
|
||||||
|
, PureResult a6
|
||||||
|
, PureResult a7
|
||||||
|
, PureResult a8
|
||||||
|
, PureResult a9
|
||||||
|
)
|
||||||
|
=> PureResult (a1, a2, a3, a4, a5, a6, a7, a8, a9) where
|
||||||
|
pureResult = (,,,,,,,,)
|
||||||
|
<$> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
|
||||||
|
instance ( PureResult a1
|
||||||
|
, PureResult a2
|
||||||
|
, PureResult a3
|
||||||
|
, PureResult a4
|
||||||
|
, PureResult a5
|
||||||
|
, PureResult a6
|
||||||
|
, PureResult a7
|
||||||
|
, PureResult a8
|
||||||
|
, PureResult a9
|
||||||
|
, PureResult a10
|
||||||
|
)
|
||||||
|
=> PureResult (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) where
|
||||||
|
pureResult = (,,,,,,,,,)
|
||||||
|
<$> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
|
||||||
|
instance ( PureResult a1
|
||||||
|
, PureResult a2
|
||||||
|
, PureResult a3
|
||||||
|
, PureResult a4
|
||||||
|
, PureResult a5
|
||||||
|
, PureResult a6
|
||||||
|
, PureResult a7
|
||||||
|
, PureResult a8
|
||||||
|
, PureResult a9
|
||||||
|
, PureResult a10
|
||||||
|
, PureResult a11
|
||||||
|
)
|
||||||
|
=> PureResult (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) where
|
||||||
|
pureResult = (,,,,,,,,,,)
|
||||||
|
<$> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
|
||||||
|
instance ( PureResult a1
|
||||||
|
, PureResult a2
|
||||||
|
, PureResult a3
|
||||||
|
, PureResult a4
|
||||||
|
, PureResult a5
|
||||||
|
, PureResult a6
|
||||||
|
, PureResult a7
|
||||||
|
, PureResult a8
|
||||||
|
, PureResult a9
|
||||||
|
, PureResult a10
|
||||||
|
, PureResult a11
|
||||||
|
, PureResult a12
|
||||||
|
)
|
||||||
|
=> PureResult (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) where
|
||||||
|
pureResult = (,,,,,,,,,,,)
|
||||||
|
<$> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
<*> pureResult
|
||||||
|
|
||||||
instance PureResult a => PureResult [a] where
|
instance PureResult a => PureResult [a] where
|
||||||
pureResult = do
|
pureResult = do
|
||||||
ResultState i ns <- get
|
ResultState i ns <- get
|
||||||
|
|
Loading…
Reference in New Issue
Block a user