mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-23 11:29:43 +01:00
Support a couple more ops by allowing larger tuples. (#93)
This commit is contained in:
parent
a7cbc27d36
commit
73eb81f6ab
2 changed files with 76 additions and 3 deletions
|
@ -66,7 +66,4 @@ generatingOpsWrappers = hooks
|
|||
blackList =
|
||||
[ -- Requires the "func" type:
|
||||
"SymbolicGradient"
|
||||
-- Easy: support larger result tuples.
|
||||
, "ParseSingleSequenceExample"
|
||||
, "Skipgram"
|
||||
]
|
||||
|
|
|
@ -81,6 +81,44 @@ instance ( BuildResult a1
|
|||
<*> buildResult
|
||||
<*> buildResult
|
||||
|
||||
instance ( BuildResult a1
|
||||
, BuildResult a2
|
||||
, BuildResult a3
|
||||
, BuildResult a4
|
||||
, BuildResult a5
|
||||
, BuildResult a6
|
||||
, BuildResult a7
|
||||
)
|
||||
=> BuildResult (a1, a2, a3, a4, a5, a6, a7) where
|
||||
buildResult = (,,,,,,)
|
||||
<$> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
|
||||
instance ( BuildResult a1
|
||||
, BuildResult a2
|
||||
, BuildResult a3
|
||||
, BuildResult a4
|
||||
, BuildResult a5
|
||||
, BuildResult a6
|
||||
, BuildResult a7
|
||||
, BuildResult a8
|
||||
)
|
||||
=> BuildResult (a1, a2, a3, a4, a5, a6, a7, a8) where
|
||||
buildResult = (,,,,,,,)
|
||||
<$> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
<*> buildResult
|
||||
|
||||
recordResult :: Result Output
|
||||
recordResult = do
|
||||
o <- ask
|
||||
|
@ -184,6 +222,44 @@ instance ( PureResult a1
|
|||
<*> pureResult
|
||||
<*> pureResult
|
||||
|
||||
instance ( PureResult a1
|
||||
, PureResult a2
|
||||
, PureResult a3
|
||||
, PureResult a4
|
||||
, PureResult a5
|
||||
, PureResult a6
|
||||
, PureResult a7
|
||||
)
|
||||
=> PureResult (a1, a2, a3, a4, a5, a6, a7) where
|
||||
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 (a1, a2, a3, a4, a5, a6, a7, a8) where
|
||||
pureResult = (,,,,,,,)
|
||||
<$> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
<*> pureResult
|
||||
|
||||
instance PureResult a => PureResult [a] where
|
||||
pureResult = do
|
||||
ResultState i ns <- get
|
||||
|
|
Loading…
Reference in a new issue