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"
|
||||
, "ParallelMapDataset"
|
||||
, "ParseSequenceExample"
|
||||
, "ParseSequenceExampleV2"
|
||||
, "PartitionedCall"
|
||||
, "ReduceDataset"
|
||||
, "RemoteCall"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../third_party/tensorflow/
|
|
@ -98,6 +98,7 @@ data Attr a = Attr
|
|||
-- | The type of an attribute.
|
||||
data AttrType = AttrSingle AttrBaseType
|
||||
| AttrList AttrBaseType
|
||||
| AttrFunc
|
||||
deriving Eq
|
||||
|
||||
data AttrBaseType = AttrBytes | AttrInt64 | AttrFloat | AttrBool
|
||||
|
@ -341,5 +342,6 @@ parseAttrType o = \case
|
|||
"list(type)" -> AttrList AttrType
|
||||
"list(shape)" -> AttrList AttrShape
|
||||
"list(tensor)" -> AttrList AttrTensor
|
||||
"func" -> AttrFunc
|
||||
t -> error $ "parseAttrType: unrecognized type " ++ show t
|
||||
++ " for op " ++ show (o ^. name)
|
||||
|
|
|
@ -257,6 +257,106 @@ instance ( PureResult a1
|
|||
<*> 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
|
||||
pureResult = do
|
||||
ResultState i ns <- get
|
||||
|
|
Loading…
Reference in New Issue