diff --git a/.gitignore b/.gitignore index dedc2e5..b717c52 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ playground.xcworkspace # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. Packages/ +Package.pins .build/ # CocoaPods diff --git a/Sources/Swirl/Query.swift b/Sources/Swirl/Query.swift index 909862e..c0d73dd 100644 --- a/Sources/Swirl/Query.swift +++ b/Sources/Swirl/Query.swift @@ -184,7 +184,7 @@ public extension QueryLike { } } -public extension QueryLike where Ret : Tuple1RepProtocol { +public extension QueryLike where Ret : Tuple1RepProtocol, Ret.Tuple == Tuple1 { public func map(_ f:(Ret.A)->BRet) -> QueryImpl { return _map { ret in ret.wrapped |> f @@ -222,7 +222,7 @@ public extension QueryLike where Ret : Tuple1RepProtocol { } } -public extension QueryLike where Ret : Tuple2RepProtocol { +public extension QueryLike where Ret : Tuple2RepProtocol, Ret.Tuple == Tuple2 { public func map(_ f:(Ret.A, Ret.B)->BRet) -> QueryImpl { return _map { ret in ret.wrapped |> f @@ -260,7 +260,7 @@ public extension QueryLike where Ret : Tuple2RepProtocol { } } -public extension QueryLike where Ret : Tuple3RepProtocol { +public extension QueryLike where Ret : Tuple3RepProtocol, Ret.Tuple == Tuple3 { public func map(_ f:(Ret.A, Ret.B, Ret.C)->BRet) -> QueryImpl { return _map { ret in ret.wrapped |> f @@ -298,7 +298,7 @@ public extension QueryLike where Ret : Tuple3RepProtocol { } } -public extension QueryLike where Ret : Tuple4RepProtocol { +public extension QueryLike where Ret : Tuple4RepProtocol, Ret.Tuple == Tuple4 { public func map(_ f:(Ret.A, Ret.B, Ret.C, Ret.D)->BRet) -> QueryImpl { return _map { ret in ret.wrapped |> f @@ -336,7 +336,7 @@ public extension QueryLike where Ret : Tuple4RepProtocol { } } -public extension QueryLike where Ret : Tuple5RepProtocol { +public extension QueryLike where Ret : Tuple5RepProtocol, Ret.Tuple == Tuple5 { public func map(_ f:(Ret.A, Ret.B, Ret.C, Ret.D, Ret.E)->BRet) -> QueryImpl { return _map { ret in ret.wrapped |> f