├── .gitignore ├── .gitmodules ├── .swift-version ├── .travis.yml ├── Cartfile ├── Cartfile.private ├── Cartfile.resolved ├── LICENSE ├── Package.swift ├── README.md ├── Sources ├── Info.plist ├── Swiftx.h └── Swiftx │ ├── Array.swift │ ├── Combinators.swift │ ├── Either.swift │ ├── Error.swift │ └── Optional.swift ├── Swiftx.podspec ├── Swiftx.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── Swiftx-iOS.xcscheme │ ├── Swiftx-tvOS.xcscheme │ ├── Swiftx-watchOS.xcscheme │ ├── Swiftx.xcscheme │ └── SwiftxTests.xcscheme └── Tests ├── Info.plist ├── LinuxMain.swift └── SwiftxTests └── EitherSpec.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | .build/* 4 | Packages/* 5 | Package.resolved 6 | build/* 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | xcuserdata 16 | *.xccheckout 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | *.xcuserstate 22 | *.xcscmblueprint 23 | Carthage/ 24 | 25 | # CocoaPods 26 | # 27 | # We recommend against adding the Pods directory to your .gitignore. However 28 | # you should judge for yourself, the pros and cons are mentioned at: 29 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 30 | # 31 | # Pods/ 32 | 33 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Carthage/Checkouts/SwiftCheck"] 2 | path = Carthage/Checkouts/SwiftCheck 3 | url = https://github.com/typelift/SwiftCheck.git 4 | [submodule "Carthage/Checkouts/Operadics"] 5 | path = Carthage/Checkouts/Operadics 6 | url = https://github.com/typelift/Operadics.git 7 | [submodule "Carthage/Checkouts/FileCheck"] 8 | path = Carthage/Checkouts/FileCheck 9 | url = https://github.com/trill-lang/FileCheck.git 10 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 5.0 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | env: 2 | global: 3 | - LC_CTYPE=en_US.UTF-8 4 | matrix: 5 | include: 6 | - os: osx 7 | language: objective-c 8 | osx_image: xcode10.2 9 | before_install: 10 | - git submodule update --init --recursive 11 | script: 12 | - pod lib lint 13 | - carthage build --no-skip-current 14 | - os: osx 15 | language: objective-c 16 | osx_image: xcode10.2 17 | before_install: 18 | - git submodule update --init --recursive 19 | script: 20 | - set -o pipefail 21 | - xcodebuild test -scheme Swiftx | xcpretty -c 22 | - xcodebuild build-for-testing -scheme Swiftx-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c 23 | - xcodebuild test -scheme Swiftx-iOS -destination "platform=iOS Simulator,name=iPad Pro (12.9-inch) (2nd generation)" | xcpretty -c 24 | - xcodebuild build-for-testing -scheme Swiftx-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c 25 | - xcodebuild test -scheme Swiftx-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | xcpretty -c 26 | - os: linux 27 | language: generic 28 | sudo: required 29 | dist: trusty 30 | before_install: 31 | - git submodule update --init --recursive 32 | - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - 33 | - wget https://swift.org/builds/swift-5.0-release/ubuntu1404/swift-5.0-RELEASE/swift-5.0-RELEASE-ubuntu14.04.tar.gz 34 | - tar xzf swift-5.0-RELEASE-ubuntu14.04.tar.gz 35 | - export PATH=${PWD}/swift-5.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}" 36 | script: 37 | - swift build 38 | notifications: 39 | webhooks: 40 | urls: 41 | - https://webhooks.gitter.im/e/1d781e1bcbabade5de35 42 | on_success: always 43 | on_failure: always 44 | on_start: always 45 | 46 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typelift/Swiftx/4affb6451b6981cf56c2ec1287aaee3406a5e5e0/Cartfile -------------------------------------------------------------------------------- /Cartfile.private: -------------------------------------------------------------------------------- 1 | github "typelift/Operadics" 2 | github "typelift/SwiftCheck" 3 | 4 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "typelift/Operadics" "0.4.0" 2 | github "typelift/SwiftCheck" "0.12.0" 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, TypeLift 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the {organization} nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "Swiftx", 7 | products: [ 8 | .library( 9 | name: "Swiftx", 10 | targets: ["Swiftx"]), 11 | ], 12 | dependencies: [ 13 | .package(url: "https://github.com/typelift/Operadics.git", from: "0.3.0"), 14 | .package(url: "https://github.com/typelift/SwiftCheck.git", from: "0.9.0"), 15 | ], 16 | targets: [ 17 | .target( 18 | name: "Swiftx", 19 | dependencies: ["Operadics"]), 20 | .testTarget( 21 | name: "SwiftxTests", 22 | dependencies: ["Swiftx", "Operadics", "SwiftCheck"]), 23 | ] 24 | ) 25 | 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Swiftx 2 | ====== 3 | 4 | Swiftx is a Swift library containing functional abstractions and extensions to 5 | the Swift Standard Library. Swiftx is a smaller and simpler way to introduce pure functional 6 | datatypes into any codebase. 7 | 8 | For a more full-featured library checkout [Swiftz](https://github.com/typelift/swiftz). 9 | 10 | Setup 11 | ----- 12 | 13 | Swiftx can be included one of two ways: 14 | 15 | **Framework** 16 | 17 | - Drag `Swiftx.xcodeproj` or `Swiftx-iOS.xcodeproj` into your project tree as a subproject 18 | - Under your project's Build Phases, expand Target Dependencies 19 | - Click the + and add Swiftx 20 | - Expand the Link Binary With Libraries phase 21 | - Click the + and add Swiftx 22 | - Click the + at the top left corner to add a Copy Files build phase 23 | - Set the directory to `Frameworks` 24 | - Click the + and add Swiftx 25 | 26 | **Standalone** 27 | 28 | - Copy the swift files under `Swiftx/Swiftx` into your project. 29 | 30 | Introduction 31 | ------------ 32 | 33 | Swiftx provides a number of common data types and abstractions any codebase can utilize. 34 | 35 | A small example: 36 | 37 | ```swift 38 | import Swiftx 39 | 40 | let str : String? = .Some("Hello ") 41 | let greeting = (+"World") <^> str // .Some("Hello World") 42 | ``` 43 | 44 | Seamless interaction with existing platform libraries is also possible with 45 | minimal effort: 46 | 47 | ```swift 48 | import Foundation 49 | import struct Swiftx.Result 50 | 51 | /// result now contains either an array of file paths or the error generated by `NSFileManager`. 52 | let result : Result<[String]> = from({ ep in 53 | let documentsDirectory : String = (NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String) 54 | return (NSFileManager.defaultManager().contentsOfDirectoryAtPath(documentsDirectory, error: ep) as [String]?) ?? [] 55 | }) 56 | ``` 57 | 58 | 59 | Swiftx can even help with expressions of nothingness or errors: 60 | 61 | ```swift 62 | import Swiftx 63 | 64 | /// We may not be able to do what we said we'd do, but this definition compiles. At runtime, 65 | /// any code that invokes this function will immediately halt the program. 66 | func provePEqualsNP() -> Proof { 67 | return undefined() 68 | } 69 | ``` 70 | 71 | System Requirements 72 | =================== 73 | 74 | Swiftx supports OS X 10.9+ and iOS 8.0+. 75 | 76 | License 77 | ======= 78 | 79 | Swiftx is released under the BSD license. 80 | 81 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.typelift.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Sources/Swiftx.h: -------------------------------------------------------------------------------- 1 | // 2 | // Swiftx.h 3 | // Swiftx 4 | // 5 | // Created by Robert Widmann on 1/21/15. 6 | // Copyright (c) 2015 TypeLift. All rights reserved. 7 | // 8 | 9 | // In this header, you should import all the public headers of your framework using statements like #import 10 | -------------------------------------------------------------------------------- /Sources/Swiftx/Array.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Array.swift 3 | // Swiftx 4 | // 5 | // Created by Maxwell Swadling on 3/06/2014. 6 | // Copyright (c) 2014 Maxwell Swadling. All rights reserved. 7 | // 8 | 9 | #if SWIFT_PACKAGE 10 | import Operadics 11 | #endif 12 | 13 | /// Fmap | Returns a new list of elements obtained by applying the given function to the entirety of 14 | /// the given list of elements in order. 15 | public func <^> (f : (A) -> B, xs : [A]) -> [B] { 16 | return xs.map(f) 17 | } 18 | 19 | /// Ap | Returns the result of applying each element of the given array of functions to the entirety 20 | /// of the list of elements, repeating until the list of functions has been exhausted. 21 | /// 22 | /// Promotes function application to arrays of functions applied to arrays of elements. 23 | public func <*> (fs : [((A) -> B)], xs : [A]) -> [B] { 24 | return fs.flatMap({ xs.map($0) }) 25 | } 26 | 27 | /// Bind | Returns the result of mapping the given function over the given array of elements and 28 | /// concatenating the result. 29 | public func >>- (xs : [A], f : (A) -> [B]) -> [B] { 30 | return xs.flatMap(f) 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Swiftx/Combinators.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Functions.swift 3 | // Swiftx 4 | // 5 | // Created by Maxwell Swadling on 3/06/2014. 6 | // Copyright (c) 2014 Maxwell Swadling. All rights reserved. 7 | // 8 | 9 | #if SWIFT_PACKAGE 10 | import Operadics 11 | #endif 12 | 13 | /// The identity function. 14 | public func identity(_ a : A) -> A { 15 | return a 16 | } 17 | 18 | /// The constant combinator ignores its second argument and always returns its first argument. 19 | public func const(_ x : A) -> (B) -> A { 20 | return { _ in x } 21 | } 22 | 23 | /// Flip a function's arguments 24 | public func flip(_ f : ((A, B) -> C), _ b : B, _ a : A) -> C { 25 | return f(a, b) 26 | } 27 | 28 | /// Flip a function's arguments and return a curried function that takes 29 | /// the arguments in flipped order. 30 | public func flip(_ f : @escaping (A) -> (B) -> C) -> (B) -> (A) -> C { 31 | return { b in { a in f(a)(b) } } 32 | } 33 | 34 | /// Compose | Applies one function to the result of another function to produce a third function. 35 | /// 36 | /// f : B -> C 37 | /// g : A -> B 38 | /// (f • g)(x) === f(g(x)) : A -> B -> C 39 | public func • (f : @escaping (B) -> C, g : @escaping (A) -> B) -> (A) -> C { 40 | return { (a : A) -> C in 41 | return f(g(a)) 42 | } 43 | } 44 | 45 | /// Apply | Applies an argument to a function. 46 | /// 47 | /// 48 | /// Because of this operator's extremely low precedence it can be used to elide parenthesis in 49 | /// complex expressions. For example: 50 | /// 51 | /// f § g § h § x = f(g(h(x))) 52 | /// 53 | /// Key Chord: ⌥ + 6 54 | public func § (f : (A) -> B, a : A) -> B { 55 | return f(a) 56 | } 57 | 58 | /// Pipe Backward | Applies the function to its left to an argument on its right. 59 | /// 60 | /// Because of this operator's extremely low precedence it can be used to elide parenthesis in 61 | /// complex expressions. For example: 62 | /// 63 | /// f <| g <| h <| x = f (g (h x)) 64 | /// 65 | /// Acts as a synonym for §. 66 | public func <| (f : (A) -> B, a : A) -> B { 67 | return f(a) 68 | } 69 | 70 | /// Pipe forward | Applies an argument on the left to a function on the right. 71 | /// 72 | /// Complex expressions may look more natural when expressed with this operator rather than normal 73 | /// argument application. For example: 74 | /// 75 | /// { $0 * $0 }({ $0.advancedBy($0) }({ $0.advancedBy($0) }(1))) 76 | /// 77 | /// can also be written as: 78 | /// 79 | /// 1 |> { $0.advancedBy($0) } 80 | /// |> { $0.advancedBy($0) } 81 | /// |> { $0 * $0 } 82 | public func |> (a : A, f : (A) -> B) -> B { 83 | return f(a) 84 | } 85 | 86 | /// The fixpoint (or Y) combinator computes the least fixed point of an equation. That is, the first 87 | /// point at which further application of x to a function is the same x. 88 | /// 89 | /// x = f(x) 90 | public func fix(_ f : @escaping ((A) -> B) -> (A) -> B) -> (A) -> B { 91 | return { x in f(fix(f))(x) } 92 | } 93 | 94 | /// The fixpoint (or Y) combinator computes the least fixed point of an equation. That is, the first 95 | /// point at which further application of x to a function is the same x. 96 | /// 97 | /// `fixt` is the exception-enabled version of fix. 98 | public func fixt(_ f : @escaping ((A) throws -> B) throws -> ((A) throws -> B)) rethrows -> (A) throws -> B { 99 | return { x in try f(fixt(f))(x) } 100 | } 101 | 102 | /// On | Applies the function on its right to both its arguments, then applies the function on its 103 | /// left to the result of both prior applications. 104 | /// 105 | /// f |*| g = { x in { y in f(g(x))(g(y)) } } 106 | /// 107 | /// This function may be useful when a comparing two like objects using a given property, as in: 108 | /// 109 | /// let arr : [(Int, String)] = [(2, "Second"), (1, "First"), (5, "Fifth"), (3, "Third"), (4, "Fourth")] 110 | /// let sortedByFirstIndex = arr.sort((<) |*| fst) 111 | public func |*| (o : @escaping (B) -> (B) -> C, f : @escaping (A) -> B) -> (A) -> (A) -> C { 112 | return on(o)(f) 113 | } 114 | 115 | /// On | Applies the function on its right to both its arguments, then applies the function on its 116 | /// left to the result of both prior applications. 117 | /// 118 | /// (+) |*| f = { x, y in f(x) + f(y) } 119 | /// 120 | /// This function may be useful when a comparing two like objects using a given property, as in: 121 | /// 122 | /// let arr : [(Int, String)] = [(2, "Second"), (1, "First"), (5, "Fifth"), (3, "Third"), (4, "Fourth")] 123 | /// let sortedByFirstIndex = arr.sort((<) |*| fst) 124 | public func |*| (o : @escaping (B, B) -> C, f : @escaping (A) -> B) -> (A) -> (A) -> C { 125 | return on(o)(f) 126 | } 127 | 128 | /// On | Applies the function on its right to both its arguments, then applies the function on its 129 | /// left to the result of both prior applications. 130 | /// 131 | /// (+) |*| f = { x in { y in f(x) + f(y) } } 132 | public func on(_ o : @escaping (B) -> (B) -> C) -> (@escaping (A) -> B) -> (A) -> (A) -> C { 133 | return { f in { x in { y in o(f(x))(f(y)) } } } 134 | } 135 | 136 | /// On | Applies the function on its right to both its arguments, then applies the function on its 137 | /// left to the result of both prior applications. 138 | /// 139 | /// (+) |*| f = { x, y in f(x) + f(y) } 140 | public func on(_ o : @escaping (B, B) -> C) -> (@escaping (A) -> B) -> (A) -> (A) -> C { 141 | return { f in { x in { y in o(f(x), f(y)) } } } 142 | } 143 | 144 | /// Applies a function to an argument until a given predicate returns true. 145 | public func until(_ p : @escaping (A) -> Bool) -> (@escaping (A) -> A) -> (A) -> A { 146 | return { f in { x in p(x) ? x : until(p)(f)(f(x)) } } 147 | } 148 | -------------------------------------------------------------------------------- /Sources/Swiftx/Either.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Either.swift 3 | // Swiftx 4 | // 5 | // Created by Maxwell Swadling on 3/06/2014. 6 | // Copyright (c) 2014 Maxwell Swadling. All rights reserved. 7 | // 8 | 9 | #if SWIFT_PACKAGE 10 | import Operadics 11 | #endif 12 | 13 | /// The `Either` type represents values with two possibilities: `.Left(L)` or `.Right(R)`. 14 | /// 15 | /// The `Either` type is right-biased by convention. That is, the `.Left` constructor is used to 16 | /// hold errors and is generally ignored and left to propagate in combinators involving `Either`, 17 | /// while `.Right` is used to hold a "correct" value - one that can be operated on further. 18 | /// 19 | /// (mnemonic: "Right" also means "Correct"). 20 | public enum Either { 21 | case Left(L) 22 | case Right(R) 23 | 24 | /// Much like the ?? operator for `Optional` types, takes a value and a function, and if the 25 | /// receiver is `.Left`, returns the value, otherwise maps the function over the value in 26 | /// `.Right` and returns that value. 27 | public func fold(_ value : B, f : (R) -> B) -> B { 28 | return either(onLeft: const(value), onRight: f); 29 | } 30 | 31 | /// Named function for `>>-`. If the `Either` is `Left`, simply returns 32 | /// a new `Left` with the value of the receiver. If `Right`, applies the function `f` 33 | /// and returns the result. 34 | public func flatMap(_ f : (R) -> Either) -> Either { 35 | return self >>- f 36 | } 37 | 38 | /// Case analysis for the `Either` type. 39 | /// 40 | /// If the value is `.Left(a)`, apply the first function to `a`. If it is `.Right(b)`, apply the 41 | /// second function to `b`. 42 | public func either(onLeft : (L) -> A, onRight : (R) -> A) -> A { 43 | switch self { 44 | case let .Left(e): 45 | return onLeft(e) 46 | case let .Right(e): 47 | return onRight(e) 48 | } 49 | } 50 | 51 | /// Determines if this `Either` value is a `Left`. 52 | public var isLeft : Bool { 53 | return left != nil 54 | } 55 | 56 | /// Determines if this `Either` value is a `Right`. 57 | public var isRight : Bool { 58 | return right != nil 59 | } 60 | 61 | /// Returns the value of `Right` if it exists otherwise nil. 62 | public var right : R? { 63 | switch self { 64 | case .Right(let r): return r 65 | default: return nil 66 | } 67 | } 68 | 69 | /// Returns the value of `Left` if it exists otherwise nil. 70 | public var left : L? { 71 | switch self { 72 | case .Left(let l): return l 73 | default: return nil 74 | } 75 | } 76 | } 77 | 78 | /// Fmap | Applies a function to any non-error value contained in the given `Either`. 79 | /// 80 | /// If the `Either` is `.Left`, the given function is ignored and result of this function is `.Left`. 81 | public func <^> (f : (RA) -> RB, e : Either) -> Either { 82 | switch e { 83 | case let .Left(l): 84 | return .Left(l) 85 | case let .Right(r): 86 | return .Right(f(r)) 87 | } 88 | } 89 | 90 | /// Ap | Given an `Either` containing an error value or a function, applies the function to any non- 91 | /// error values contained in the given `Either`. 92 | /// 93 | /// If the `Either` containing the function is `.Left` the result of this function is `.Left`. Else 94 | /// the result of this function is the result of `fmap`ing the function over the given `Either`. 95 | /// 96 | /// Promotes function application to sums of values and functions applied to sums of values. 97 | public func <*> (f : Either RB>, e : Either) -> Either { 98 | switch (f, e) { 99 | case let (.Left(l), _): 100 | return .Left(l) 101 | case let (.Right(f), r): 102 | return f <^> r 103 | } 104 | } 105 | 106 | /// Bind | Applies a function to any non-error value contained in the given `Either`. 107 | /// 108 | /// If the `Either` is `.Left`, the given function is ignored and the result of this function is 109 | /// `.Left`. Else the result of this function is the application of the function to the value 110 | /// contained in the `Either`. 111 | public func >>- (a : Either, f : (RA) -> Either) -> Either { 112 | switch a { 113 | case let .Left(l): 114 | return .Left(l) 115 | case let .Right(r): 116 | return f(r) 117 | } 118 | } 119 | 120 | /// MARK : Equatable 121 | 122 | public func == (lhs : Either, rhs : Either) -> Bool { 123 | switch (lhs, rhs) { 124 | case let (.Left(l), .Left(r)) where l == r: 125 | return true 126 | case let (.Right(l), .Right(r)) where l == r: 127 | return true 128 | default: 129 | return false 130 | } 131 | } 132 | 133 | public func != (lhs : Either, rhs : Either) -> Bool { 134 | return !(lhs == rhs) 135 | } 136 | -------------------------------------------------------------------------------- /Sources/Swiftx/Error.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Error.swift 3 | // Swiftx 4 | // 5 | // Created by Robert Widmann on 12/23/14. 6 | // Copyright (c) 2014 TypeLift. All rights reserved. 7 | // 8 | 9 | /// Immediately terminates the program with an error message. 10 | public func error(_ x : String) -> A { 11 | fatalError(x) 12 | } 13 | 14 | /// A special case of error. 15 | /// 16 | /// Undefined is often used in place of an actual definition for functions that have yet to be 17 | /// written. When the compiler calls said function, it will immediately terminate the program until 18 | /// a suitable definition is put in its place. 19 | /// 20 | /// For example: 21 | /// 22 | /// public func sortBy(cmp : (A, A) -> Bool)(l : [A]) -> [A] { 23 | /// return undefined() 24 | /// } 25 | public func undefined() -> A { 26 | return error("Undefined") 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Swiftx/Optional.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Optional.swift 3 | // Swiftx 4 | // 5 | // Created by Maxwell Swadling on 3/06/2014. 6 | // Copyright (c) 2014 Maxwell Swadling. All rights reserved. 7 | // 8 | 9 | #if SWIFT_PACKAGE 10 | import Operadics 11 | #endif 12 | 13 | /// Fmap | If the Optional is `.None`, ignores the function and returns `.None`. Else if the 14 | /// Optional is `.Some`, applies the function to its value and returns the result in a new `.Some`. 15 | public func <^> (f : (A) -> B, a : A?) -> B? { 16 | return a.map(f) 17 | } 18 | 19 | /// Ap | Returns the result of applying the given Optional function to a given Optional value. If 20 | /// the function and value both exist the result is the function applied to the value. Else the 21 | /// result is `.None`. 22 | /// 23 | /// Promotes function application to an Optional function applied to an Optional value. 24 | public func <*> (f : ((A) -> B)?, a : A?) -> B? { 25 | return f.flatMap { $0 <^> a } 26 | } 27 | 28 | /// Bind | Returns the result of applying a function return an Optional to an Optional value. If 29 | /// the value is `.None` the result of this function is `.None`. If the value is `.Some`, the 30 | /// result is the application of the function to the value contained within. 31 | /// 32 | /// Bind propagates any occurance of `.None` through a computation that may fail at several points. 33 | public func >>- (a : A?, f : (A) -> B?) -> B? { 34 | return a.flatMap(f) 35 | } 36 | -------------------------------------------------------------------------------- /Swiftx.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "Swiftx" 3 | s.version = "0.6.0" 4 | s.summary = "Functional data types and functions for any project." 5 | s.homepage = "https://github.com/typelift/Swiftx" 6 | s.license = { :type => "MIT", :text => <<-LICENSE 7 | The MIT License (MIT) 8 | 9 | Copyright (c) 2015 TypeLift 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all 19 | copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | SOFTWARE. 28 | 29 | LICENSE 30 | } 31 | s.authors = { "CodaFi" => "devteam.codafi@gmail.com", "pthariensflame" => "alexanderaltman@me.com" } 32 | 33 | s.requires_arc = true 34 | s.osx.deployment_target = "10.9" 35 | s.ios.deployment_target = "8.0" 36 | s.tvos.deployment_target = "9.1" 37 | s.watchos.deployment_target = "2.1" 38 | s.source = { :git => "https://github.com/typelift/Swiftx.git", :tag => "#{s.version}", :submodules => true } 39 | s.source_files = "Sources/Swiftx/*.swift", "Carthage/Checkouts/Operadics/Sources/Operadics/Operators.swift" 40 | end 41 | 42 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8240CD8B1C3A39D500EF4D29 /* Swiftx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8240CD811C3A39D500EF4D29 /* Swiftx.framework */; }; 11 | 826F9C16224E493B00FA5106 /* SwiftCheck.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8240CD9B1C3A39D600EF4D29 /* SwiftCheck.framework */; }; 12 | 826F9C19224E499C00FA5106 /* Swiftx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84DF76681B0BDE0A00C912B0 /* Swiftx.framework */; }; 13 | 826F9C1B224E49D300FA5106 /* SwiftCheck.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 826F9C1A224E49D300FA5106 /* SwiftCheck.framework */; }; 14 | 82E51B961B5D4BA3003CA361 /* SwiftCheck.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 82E51B8F1B5D4B8B003CA361 /* SwiftCheck.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 82E51B971B5D4BAC003CA361 /* SwiftCheck.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 82E51B8B1B5D4B8B003CA361 /* SwiftCheck.framework */; }; 16 | 82E51B981B5D4BAE003CA361 /* SwiftCheck.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 82E51B8B1B5D4B8B003CA361 /* SwiftCheck.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 82F2D2591F765545009C32CC /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2581F765545009C32CC /* Operators.swift */; }; 18 | 82F2D25A1F765545009C32CC /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2581F765545009C32CC /* Operators.swift */; }; 19 | 82F2D25B1F765545009C32CC /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2581F765545009C32CC /* Operators.swift */; }; 20 | 82F2D25C1F765545009C32CC /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2581F765545009C32CC /* Operators.swift */; }; 21 | 82F2D2721F76561E009C32CC /* Combinators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2641F76561E009C32CC /* Combinators.swift */; }; 22 | 82F2D2731F76561E009C32CC /* Combinators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2641F76561E009C32CC /* Combinators.swift */; }; 23 | 82F2D2741F76561E009C32CC /* Combinators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2641F76561E009C32CC /* Combinators.swift */; }; 24 | 82F2D2751F76561E009C32CC /* Combinators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2641F76561E009C32CC /* Combinators.swift */; }; 25 | 82F2D27D1F765655009C32CC /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27A1F765655009C32CC /* Optional.swift */; }; 26 | 82F2D27E1F765655009C32CC /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27A1F765655009C32CC /* Optional.swift */; }; 27 | 82F2D27F1F765655009C32CC /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27A1F765655009C32CC /* Optional.swift */; }; 28 | 82F2D2801F765655009C32CC /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27A1F765655009C32CC /* Optional.swift */; }; 29 | 82F2D2811F765655009C32CC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27B1F765655009C32CC /* Error.swift */; }; 30 | 82F2D2821F765655009C32CC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27B1F765655009C32CC /* Error.swift */; }; 31 | 82F2D2831F765655009C32CC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27B1F765655009C32CC /* Error.swift */; }; 32 | 82F2D2841F765655009C32CC /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27B1F765655009C32CC /* Error.swift */; }; 33 | 82F2D2851F765655009C32CC /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27C1F765655009C32CC /* Either.swift */; }; 34 | 82F2D2861F765655009C32CC /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27C1F765655009C32CC /* Either.swift */; }; 35 | 82F2D2871F765655009C32CC /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27C1F765655009C32CC /* Either.swift */; }; 36 | 82F2D2881F765655009C32CC /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D27C1F765655009C32CC /* Either.swift */; }; 37 | 82F2D28A1F765662009C32CC /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2891F765662009C32CC /* Array.swift */; }; 38 | 82F2D28B1F765662009C32CC /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2891F765662009C32CC /* Array.swift */; }; 39 | 82F2D28C1F765662009C32CC /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2891F765662009C32CC /* Array.swift */; }; 40 | 82F2D28D1F765662009C32CC /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2D2891F765662009C32CC /* Array.swift */; }; 41 | 82FCDC3E1D73C4330011C27F /* Swiftx.h in Headers */ = {isa = PBXBuildFile; fileRef = 82FCDC3D1D73C4330011C27F /* Swiftx.h */; settings = {ATTRIBUTES = (Public, ); }; }; 42 | 82FCDC3F1D73C4330011C27F /* Swiftx.h in Headers */ = {isa = PBXBuildFile; fileRef = 82FCDC3D1D73C4330011C27F /* Swiftx.h */; settings = {ATTRIBUTES = (Public, ); }; }; 43 | 82FCDC401D73C4330011C27F /* Swiftx.h in Headers */ = {isa = PBXBuildFile; fileRef = 82FCDC3D1D73C4330011C27F /* Swiftx.h */; settings = {ATTRIBUTES = (Public, ); }; }; 44 | 82FCDC411D73C4330011C27F /* Swiftx.h in Headers */ = {isa = PBXBuildFile; fileRef = 82FCDC3D1D73C4330011C27F /* Swiftx.h */; settings = {ATTRIBUTES = (Public, ); }; }; 45 | 82FCDC421D73C4910011C27F /* EitherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FCDC231D73C3A50011C27F /* EitherSpec.swift */; }; 46 | 82FCDC431D73C4920011C27F /* EitherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FCDC231D73C3A50011C27F /* EitherSpec.swift */; }; 47 | 82FCDC441D73C4930011C27F /* EitherSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FCDC231D73C3A50011C27F /* EitherSpec.swift */; }; 48 | 841408BD1B1A89AD00BA2B6C /* Swiftx.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84DF76681B0BDE0A00C912B0 /* Swiftx.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 49 | 8480AB371A7B232A00C6162D /* Swiftx.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84A88C891A70BD71003D53CF /* Swiftx.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 50 | 84A88C951A70BD71003D53CF /* Swiftx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A88C891A70BD71003D53CF /* Swiftx.framework */; }; 51 | /* End PBXBuildFile section */ 52 | 53 | /* Begin PBXContainerItemProxy section */ 54 | 8240CD8C1C3A39D500EF4D29 /* PBXContainerItemProxy */ = { 55 | isa = PBXContainerItemProxy; 56 | containerPortal = 84A88C801A70BD71003D53CF /* Project object */; 57 | proxyType = 1; 58 | remoteGlobalIDString = 8240CD801C3A39D500EF4D29; 59 | remoteInfo = "Swiftx-tvOS"; 60 | }; 61 | 8240CD9A1C3A39D600EF4D29 /* PBXContainerItemProxy */ = { 62 | isa = PBXContainerItemProxy; 63 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 64 | proxyType = 2; 65 | remoteGlobalIDString = 8240CCB11C3A123600EF4D29; 66 | remoteInfo = "SwiftCheck-tvOS"; 67 | }; 68 | 8240CD9C1C3A39D600EF4D29 /* PBXContainerItemProxy */ = { 69 | isa = PBXContainerItemProxy; 70 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 71 | proxyType = 2; 72 | remoteGlobalIDString = 8240CCBA1C3A123700EF4D29; 73 | remoteInfo = "SwiftCheck-tvOSTests"; 74 | }; 75 | 8240CDCE1C3A401500EF4D29 /* PBXContainerItemProxy */ = { 76 | isa = PBXContainerItemProxy; 77 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 78 | proxyType = 1; 79 | remoteGlobalIDString = 8240CCB01C3A123600EF4D29; 80 | remoteInfo = "SwiftCheck-tvOS"; 81 | }; 82 | 826F9C17224E497900FA5106 /* PBXContainerItemProxy */ = { 83 | isa = PBXContainerItemProxy; 84 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 85 | proxyType = 1; 86 | remoteGlobalIDString = 84DF75F71B0BD54600C912B0; 87 | remoteInfo = "SwiftCheck-iOS"; 88 | }; 89 | 82E51B8A1B5D4B8B003CA361 /* PBXContainerItemProxy */ = { 90 | isa = PBXContainerItemProxy; 91 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 92 | proxyType = 2; 93 | remoteGlobalIDString = 844FCC8D198B320500EB242A; 94 | remoteInfo = SwiftCheck; 95 | }; 96 | 82E51B8C1B5D4B8B003CA361 /* PBXContainerItemProxy */ = { 97 | isa = PBXContainerItemProxy; 98 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 99 | proxyType = 2; 100 | remoteGlobalIDString = 844FCC98198B320500EB242A; 101 | remoteInfo = SwiftCheckTests; 102 | }; 103 | 82E51B8E1B5D4B8B003CA361 /* PBXContainerItemProxy */ = { 104 | isa = PBXContainerItemProxy; 105 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 106 | proxyType = 2; 107 | remoteGlobalIDString = 84DF75F81B0BD54600C912B0; 108 | remoteInfo = "SwiftCheck-iOS"; 109 | }; 110 | 82E51B901B5D4B8B003CA361 /* PBXContainerItemProxy */ = { 111 | isa = PBXContainerItemProxy; 112 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 113 | proxyType = 2; 114 | remoteGlobalIDString = 84DF76021B0BD54600C912B0; 115 | remoteInfo = "SwiftCheck-iOSTests"; 116 | }; 117 | 82E51B9A1B5D4BB9003CA361 /* PBXContainerItemProxy */ = { 118 | isa = PBXContainerItemProxy; 119 | containerPortal = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 120 | proxyType = 1; 121 | remoteGlobalIDString = 844FCC8C198B320500EB242A; 122 | remoteInfo = SwiftCheck; 123 | }; 124 | 84A88C961A70BD71003D53CF /* PBXContainerItemProxy */ = { 125 | isa = PBXContainerItemProxy; 126 | containerPortal = 84A88C801A70BD71003D53CF /* Project object */; 127 | proxyType = 1; 128 | remoteGlobalIDString = 84A88C881A70BD71003D53CF; 129 | remoteInfo = Swiftx; 130 | }; 131 | 84DF76741B0BDE0A00C912B0 /* PBXContainerItemProxy */ = { 132 | isa = PBXContainerItemProxy; 133 | containerPortal = 84A88C801A70BD71003D53CF /* Project object */; 134 | proxyType = 1; 135 | remoteGlobalIDString = 84DF76671B0BDE0A00C912B0; 136 | remoteInfo = "Swiftx-iOS"; 137 | }; 138 | /* End PBXContainerItemProxy section */ 139 | 140 | /* Begin PBXCopyFilesBuildPhase section */ 141 | 841408BC1B1A89A600BA2B6C /* CopyFiles */ = { 142 | isa = PBXCopyFilesBuildPhase; 143 | buildActionMask = 2147483647; 144 | dstPath = ""; 145 | dstSubfolderSpec = 10; 146 | files = ( 147 | 82E51B961B5D4BA3003CA361 /* SwiftCheck.framework in CopyFiles */, 148 | 841408BD1B1A89AD00BA2B6C /* Swiftx.framework in CopyFiles */, 149 | ); 150 | runOnlyForDeploymentPostprocessing = 0; 151 | }; 152 | 8480AB361A7B232200C6162D /* CopyFiles */ = { 153 | isa = PBXCopyFilesBuildPhase; 154 | buildActionMask = 2147483647; 155 | dstPath = ""; 156 | dstSubfolderSpec = 10; 157 | files = ( 158 | 82E51B981B5D4BAE003CA361 /* SwiftCheck.framework in CopyFiles */, 159 | 8480AB371A7B232A00C6162D /* Swiftx.framework in CopyFiles */, 160 | ); 161 | runOnlyForDeploymentPostprocessing = 0; 162 | }; 163 | /* End PBXCopyFilesBuildPhase section */ 164 | 165 | /* Begin PBXFileReference section */ 166 | 8240CD811C3A39D500EF4D29 /* Swiftx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swiftx.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 167 | 8240CD8A1C3A39D500EF4D29 /* Swiftx-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swiftx-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 168 | 8240CDA51C3A39F000EF4D29 /* Swiftx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swiftx.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 169 | 826F9C1A224E49D300FA5106 /* SwiftCheck.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftCheck.framework; path = "../../Library/Developer/Xcode/DerivedData/Swiftx-gvghmkefilcrbjeddxunzrknagfa/Build/Products/Debug-iphoneos/SwiftCheck.framework"; sourceTree = ""; }; 170 | 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftCheck.xcodeproj; path = Carthage/Checkouts/SwiftCheck/SwiftCheck.xcodeproj; sourceTree = ""; }; 171 | 82F2D2581F765545009C32CC /* Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Carthage/Checkouts/Operadics/Sources/Operadics/Operators.swift; sourceTree = SOURCE_ROOT; }; 172 | 82F2D2641F76561E009C32CC /* Combinators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Combinators.swift; path = Sources/Swiftx/Combinators.swift; sourceTree = SOURCE_ROOT; }; 173 | 82F2D27A1F765655009C32CC /* Optional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = Sources/Swiftx/Optional.swift; sourceTree = SOURCE_ROOT; }; 174 | 82F2D27B1F765655009C32CC /* Error.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Error.swift; path = Sources/Swiftx/Error.swift; sourceTree = SOURCE_ROOT; }; 175 | 82F2D27C1F765655009C32CC /* Either.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Either.swift; path = Sources/Swiftx/Either.swift; sourceTree = SOURCE_ROOT; }; 176 | 82F2D2891F765662009C32CC /* Array.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Array.swift; path = Sources/Swiftx/Array.swift; sourceTree = SOURCE_ROOT; }; 177 | 82FCDC231D73C3A50011C27F /* EitherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = EitherSpec.swift; path = Tests/SwiftxTests/EitherSpec.swift; sourceTree = ""; }; 178 | 82FCDC241D73C3A50011C27F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Tests/Info.plist; sourceTree = ""; }; 179 | 82FCDC371D73C3CC0011C27F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sources/Info.plist; sourceTree = SOURCE_ROOT; }; 180 | 82FCDC3D1D73C4330011C27F /* Swiftx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Swiftx.h; path = Carthage/Checkouts/SwiftCheck/../../../Sources/Swiftx.h; sourceTree = ""; }; 181 | 84A88C891A70BD71003D53CF /* Swiftx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swiftx.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 182 | 84A88C941A70BD71003D53CF /* SwiftxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 183 | 84DF76681B0BDE0A00C912B0 /* Swiftx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swiftx.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 184 | 84DF76721B0BDE0A00C912B0 /* Swiftx-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Swiftx-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 185 | /* End PBXFileReference section */ 186 | 187 | /* Begin PBXFrameworksBuildPhase section */ 188 | 8240CD7D1C3A39D500EF4D29 /* Frameworks */ = { 189 | isa = PBXFrameworksBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | 8240CD871C3A39D500EF4D29 /* Frameworks */ = { 196 | isa = PBXFrameworksBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 826F9C16224E493B00FA5106 /* SwiftCheck.framework in Frameworks */, 200 | 8240CD8B1C3A39D500EF4D29 /* Swiftx.framework in Frameworks */, 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | 8240CDA11C3A39F000EF4D29 /* Frameworks */ = { 205 | isa = PBXFrameworksBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | ); 209 | runOnlyForDeploymentPostprocessing = 0; 210 | }; 211 | 84A88C851A70BD71003D53CF /* Frameworks */ = { 212 | isa = PBXFrameworksBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 84A88C911A70BD71003D53CF /* Frameworks */ = { 219 | isa = PBXFrameworksBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 82E51B971B5D4BAC003CA361 /* SwiftCheck.framework in Frameworks */, 223 | 84A88C951A70BD71003D53CF /* Swiftx.framework in Frameworks */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | 84DF76641B0BDE0A00C912B0 /* Frameworks */ = { 228 | isa = PBXFrameworksBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | 84DF766F1B0BDE0A00C912B0 /* Frameworks */ = { 235 | isa = PBXFrameworksBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 826F9C19224E499C00FA5106 /* Swiftx.framework in Frameworks */, 239 | 826F9C1B224E49D300FA5106 /* SwiftCheck.framework in Frameworks */, 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | /* End PBXFrameworksBuildPhase section */ 244 | 245 | /* Begin PBXGroup section */ 246 | 826F9C15224E493B00FA5106 /* Frameworks */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | 826F9C1A224E49D300FA5106 /* SwiftCheck.framework */, 250 | ); 251 | name = Frameworks; 252 | sourceTree = ""; 253 | }; 254 | 82E51B841B5D4B8B003CA361 /* Products */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | 82E51B8B1B5D4B8B003CA361 /* SwiftCheck.framework */, 258 | 82E51B8D1B5D4B8B003CA361 /* SwiftCheckTests.xctest */, 259 | 82E51B8F1B5D4B8B003CA361 /* SwiftCheck.framework */, 260 | 82E51B911B5D4B8B003CA361 /* SwiftCheck-iOSTests.xctest */, 261 | 8240CD9B1C3A39D600EF4D29 /* SwiftCheck.framework */, 262 | 8240CD9D1C3A39D600EF4D29 /* SwiftCheck-tvOSTests.xctest */, 263 | ); 264 | name = Products; 265 | sourceTree = ""; 266 | }; 267 | 84A88C7F1A70BD71003D53CF = { 268 | isa = PBXGroup; 269 | children = ( 270 | 82FCDC3D1D73C4330011C27F /* Swiftx.h */, 271 | 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */, 272 | 84A88CE81A70BDB9003D53CF /* Swiftx */, 273 | 84A88D2E1A70BF0A003D53CF /* SwiftxTests */, 274 | 84A88C8A1A70BD71003D53CF /* Products */, 275 | 826F9C15224E493B00FA5106 /* Frameworks */, 276 | ); 277 | indentWidth = 4; 278 | sourceTree = ""; 279 | tabWidth = 4; 280 | usesTabs = 1; 281 | }; 282 | 84A88C8A1A70BD71003D53CF /* Products */ = { 283 | isa = PBXGroup; 284 | children = ( 285 | 84A88C891A70BD71003D53CF /* Swiftx.framework */, 286 | 84A88C941A70BD71003D53CF /* SwiftxTests.xctest */, 287 | 84DF76681B0BDE0A00C912B0 /* Swiftx.framework */, 288 | 84DF76721B0BDE0A00C912B0 /* Swiftx-iOSTests.xctest */, 289 | 8240CD811C3A39D500EF4D29 /* Swiftx.framework */, 290 | 8240CD8A1C3A39D500EF4D29 /* Swiftx-tvOSTests.xctest */, 291 | 8240CDA51C3A39F000EF4D29 /* Swiftx.framework */, 292 | ); 293 | name = Products; 294 | sourceTree = ""; 295 | }; 296 | 84A88CE81A70BDB9003D53CF /* Swiftx */ = { 297 | isa = PBXGroup; 298 | children = ( 299 | 82F2D2581F765545009C32CC /* Operators.swift */, 300 | 82F2D2641F76561E009C32CC /* Combinators.swift */, 301 | 84A88D2B1A70BEE0003D53CF /* Data */, 302 | 84A88D2C1A70BEEA003D53CF /* Stdlib */, 303 | 84A88D091A70BDDD003D53CF /* Supporting Files */, 304 | ); 305 | path = Swiftx; 306 | sourceTree = ""; 307 | }; 308 | 84A88D091A70BDDD003D53CF /* Supporting Files */ = { 309 | isa = PBXGroup; 310 | children = ( 311 | 82FCDC371D73C3CC0011C27F /* Info.plist */, 312 | ); 313 | name = "Supporting Files"; 314 | sourceTree = ""; 315 | }; 316 | 84A88D2B1A70BEE0003D53CF /* Data */ = { 317 | isa = PBXGroup; 318 | children = ( 319 | 82F2D2891F765662009C32CC /* Array.swift */, 320 | ); 321 | name = Data; 322 | sourceTree = ""; 323 | }; 324 | 84A88D2C1A70BEEA003D53CF /* Stdlib */ = { 325 | isa = PBXGroup; 326 | children = ( 327 | 82F2D27C1F765655009C32CC /* Either.swift */, 328 | 82F2D27B1F765655009C32CC /* Error.swift */, 329 | 82F2D27A1F765655009C32CC /* Optional.swift */, 330 | ); 331 | name = Stdlib; 332 | sourceTree = ""; 333 | }; 334 | 84A88D2E1A70BF0A003D53CF /* SwiftxTests */ = { 335 | isa = PBXGroup; 336 | children = ( 337 | 82FCDC231D73C3A50011C27F /* EitherSpec.swift */, 338 | 84A88D371A70BF4F003D53CF /* Supporting Files */, 339 | ); 340 | name = SwiftxTests; 341 | sourceTree = ""; 342 | }; 343 | 84A88D371A70BF4F003D53CF /* Supporting Files */ = { 344 | isa = PBXGroup; 345 | children = ( 346 | 82FCDC241D73C3A50011C27F /* Info.plist */, 347 | ); 348 | name = "Supporting Files"; 349 | sourceTree = ""; 350 | }; 351 | /* End PBXGroup section */ 352 | 353 | /* Begin PBXHeadersBuildPhase section */ 354 | 8240CD7E1C3A39D500EF4D29 /* Headers */ = { 355 | isa = PBXHeadersBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | 82FCDC401D73C4330011C27F /* Swiftx.h in Headers */, 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | 8240CDA21C3A39F000EF4D29 /* Headers */ = { 363 | isa = PBXHeadersBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | 82FCDC411D73C4330011C27F /* Swiftx.h in Headers */, 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | 84A88C861A70BD71003D53CF /* Headers */ = { 371 | isa = PBXHeadersBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | 82FCDC3E1D73C4330011C27F /* Swiftx.h in Headers */, 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | }; 378 | 84DF76651B0BDE0A00C912B0 /* Headers */ = { 379 | isa = PBXHeadersBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | 82FCDC3F1D73C4330011C27F /* Swiftx.h in Headers */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | /* End PBXHeadersBuildPhase section */ 387 | 388 | /* Begin PBXNativeTarget section */ 389 | 8240CD801C3A39D500EF4D29 /* Swiftx-tvOS */ = { 390 | isa = PBXNativeTarget; 391 | buildConfigurationList = 8240CD9E1C3A39D600EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-tvOS" */; 392 | buildPhases = ( 393 | 8240CD7C1C3A39D500EF4D29 /* Sources */, 394 | 8240CD7D1C3A39D500EF4D29 /* Frameworks */, 395 | 8240CD7E1C3A39D500EF4D29 /* Headers */, 396 | 8240CD7F1C3A39D500EF4D29 /* Resources */, 397 | ); 398 | buildRules = ( 399 | ); 400 | dependencies = ( 401 | ); 402 | name = "Swiftx-tvOS"; 403 | productName = "Swiftx-tvOS"; 404 | productReference = 8240CD811C3A39D500EF4D29 /* Swiftx.framework */; 405 | productType = "com.apple.product-type.framework"; 406 | }; 407 | 8240CD891C3A39D500EF4D29 /* Swiftx-tvOSTests */ = { 408 | isa = PBXNativeTarget; 409 | buildConfigurationList = 8240CD9F1C3A39D600EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-tvOSTests" */; 410 | buildPhases = ( 411 | 8240CD861C3A39D500EF4D29 /* Sources */, 412 | 8240CD871C3A39D500EF4D29 /* Frameworks */, 413 | 8240CD881C3A39D500EF4D29 /* Resources */, 414 | ); 415 | buildRules = ( 416 | ); 417 | dependencies = ( 418 | 8240CDCF1C3A401500EF4D29 /* PBXTargetDependency */, 419 | 8240CD8D1C3A39D500EF4D29 /* PBXTargetDependency */, 420 | ); 421 | name = "Swiftx-tvOSTests"; 422 | productName = "Swiftx-tvOSTests"; 423 | productReference = 8240CD8A1C3A39D500EF4D29 /* Swiftx-tvOSTests.xctest */; 424 | productType = "com.apple.product-type.bundle.unit-test"; 425 | }; 426 | 8240CDA41C3A39F000EF4D29 /* Swiftx-watchOS */ = { 427 | isa = PBXNativeTarget; 428 | buildConfigurationList = 8240CDAA1C3A39F000EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-watchOS" */; 429 | buildPhases = ( 430 | 8240CDA01C3A39F000EF4D29 /* Sources */, 431 | 8240CDA11C3A39F000EF4D29 /* Frameworks */, 432 | 8240CDA21C3A39F000EF4D29 /* Headers */, 433 | 8240CDA31C3A39F000EF4D29 /* Resources */, 434 | ); 435 | buildRules = ( 436 | ); 437 | dependencies = ( 438 | ); 439 | name = "Swiftx-watchOS"; 440 | productName = "Swiftx-watchOS"; 441 | productReference = 8240CDA51C3A39F000EF4D29 /* Swiftx.framework */; 442 | productType = "com.apple.product-type.framework"; 443 | }; 444 | 84A88C881A70BD71003D53CF /* Swiftx */ = { 445 | isa = PBXNativeTarget; 446 | buildConfigurationList = 84A88C9F1A70BD71003D53CF /* Build configuration list for PBXNativeTarget "Swiftx" */; 447 | buildPhases = ( 448 | 84A88C841A70BD71003D53CF /* Sources */, 449 | 84A88C851A70BD71003D53CF /* Frameworks */, 450 | 84A88C861A70BD71003D53CF /* Headers */, 451 | 84A88C871A70BD71003D53CF /* Resources */, 452 | ); 453 | buildRules = ( 454 | ); 455 | dependencies = ( 456 | ); 457 | name = Swiftx; 458 | productName = Swiftx; 459 | productReference = 84A88C891A70BD71003D53CF /* Swiftx.framework */; 460 | productType = "com.apple.product-type.framework"; 461 | }; 462 | 84A88C931A70BD71003D53CF /* SwiftxTests */ = { 463 | isa = PBXNativeTarget; 464 | buildConfigurationList = 84A88CA21A70BD71003D53CF /* Build configuration list for PBXNativeTarget "SwiftxTests" */; 465 | buildPhases = ( 466 | 84A88C901A70BD71003D53CF /* Sources */, 467 | 84A88C911A70BD71003D53CF /* Frameworks */, 468 | 84A88C921A70BD71003D53CF /* Resources */, 469 | 8480AB361A7B232200C6162D /* CopyFiles */, 470 | ); 471 | buildRules = ( 472 | ); 473 | dependencies = ( 474 | 82E51B9B1B5D4BB9003CA361 /* PBXTargetDependency */, 475 | 84A88C971A70BD71003D53CF /* PBXTargetDependency */, 476 | ); 477 | name = SwiftxTests; 478 | productName = SwiftxTests; 479 | productReference = 84A88C941A70BD71003D53CF /* SwiftxTests.xctest */; 480 | productType = "com.apple.product-type.bundle.unit-test"; 481 | }; 482 | 84DF76671B0BDE0A00C912B0 /* Swiftx-iOS */ = { 483 | isa = PBXNativeTarget; 484 | buildConfigurationList = 84DF767B1B0BDE0A00C912B0 /* Build configuration list for PBXNativeTarget "Swiftx-iOS" */; 485 | buildPhases = ( 486 | 84DF76631B0BDE0A00C912B0 /* Sources */, 487 | 84DF76641B0BDE0A00C912B0 /* Frameworks */, 488 | 84DF76651B0BDE0A00C912B0 /* Headers */, 489 | 84DF76661B0BDE0A00C912B0 /* Resources */, 490 | ); 491 | buildRules = ( 492 | ); 493 | dependencies = ( 494 | ); 495 | name = "Swiftx-iOS"; 496 | productName = "Swiftx-iOS"; 497 | productReference = 84DF76681B0BDE0A00C912B0 /* Swiftx.framework */; 498 | productType = "com.apple.product-type.framework"; 499 | }; 500 | 84DF76711B0BDE0A00C912B0 /* Swiftx-iOSTests */ = { 501 | isa = PBXNativeTarget; 502 | buildConfigurationList = 84DF767E1B0BDE0A00C912B0 /* Build configuration list for PBXNativeTarget "Swiftx-iOSTests" */; 503 | buildPhases = ( 504 | 84DF766E1B0BDE0A00C912B0 /* Sources */, 505 | 84DF766F1B0BDE0A00C912B0 /* Frameworks */, 506 | 84DF76701B0BDE0A00C912B0 /* Resources */, 507 | 841408BC1B1A89A600BA2B6C /* CopyFiles */, 508 | ); 509 | buildRules = ( 510 | ); 511 | dependencies = ( 512 | 826F9C18224E497900FA5106 /* PBXTargetDependency */, 513 | 84DF76751B0BDE0A00C912B0 /* PBXTargetDependency */, 514 | ); 515 | name = "Swiftx-iOSTests"; 516 | productName = "Swiftx-iOSTests"; 517 | productReference = 84DF76721B0BDE0A00C912B0 /* Swiftx-iOSTests.xctest */; 518 | productType = "com.apple.product-type.bundle.unit-test"; 519 | }; 520 | /* End PBXNativeTarget section */ 521 | 522 | /* Begin PBXProject section */ 523 | 84A88C801A70BD71003D53CF /* Project object */ = { 524 | isa = PBXProject; 525 | attributes = { 526 | LastSwiftUpdateCheck = 0720; 527 | LastUpgradeCheck = 1020; 528 | ORGANIZATIONNAME = TypeLift; 529 | TargetAttributes = { 530 | 8240CD801C3A39D500EF4D29 = { 531 | CreatedOnToolsVersion = 7.2; 532 | }; 533 | 8240CD891C3A39D500EF4D29 = { 534 | CreatedOnToolsVersion = 7.2; 535 | }; 536 | 8240CDA41C3A39F000EF4D29 = { 537 | CreatedOnToolsVersion = 7.2; 538 | }; 539 | 84A88C881A70BD71003D53CF = { 540 | CreatedOnToolsVersion = 6.2; 541 | LastSwiftMigration = 1020; 542 | }; 543 | 84A88C931A70BD71003D53CF = { 544 | CreatedOnToolsVersion = 6.2; 545 | LastSwiftMigration = 1020; 546 | }; 547 | 84DF76671B0BDE0A00C912B0 = { 548 | CreatedOnToolsVersion = 6.4; 549 | LastSwiftMigration = 1020; 550 | }; 551 | 84DF76711B0BDE0A00C912B0 = { 552 | CreatedOnToolsVersion = 6.4; 553 | DevelopmentTeam = D33M56YTC8; 554 | LastSwiftMigration = 1020; 555 | }; 556 | }; 557 | }; 558 | buildConfigurationList = 84A88C831A70BD71003D53CF /* Build configuration list for PBXProject "Swiftx" */; 559 | compatibilityVersion = "Xcode 3.2"; 560 | developmentRegion = en; 561 | hasScannedForEncodings = 0; 562 | knownRegions = ( 563 | en, 564 | Base, 565 | ); 566 | mainGroup = 84A88C7F1A70BD71003D53CF; 567 | productRefGroup = 84A88C8A1A70BD71003D53CF /* Products */; 568 | projectDirPath = ""; 569 | projectReferences = ( 570 | { 571 | ProductGroup = 82E51B841B5D4B8B003CA361 /* Products */; 572 | ProjectRef = 82E51B831B5D4B8B003CA361 /* SwiftCheck.xcodeproj */; 573 | }, 574 | ); 575 | projectRoot = ""; 576 | targets = ( 577 | 84A88C881A70BD71003D53CF /* Swiftx */, 578 | 84A88C931A70BD71003D53CF /* SwiftxTests */, 579 | 84DF76671B0BDE0A00C912B0 /* Swiftx-iOS */, 580 | 84DF76711B0BDE0A00C912B0 /* Swiftx-iOSTests */, 581 | 8240CD801C3A39D500EF4D29 /* Swiftx-tvOS */, 582 | 8240CD891C3A39D500EF4D29 /* Swiftx-tvOSTests */, 583 | 8240CDA41C3A39F000EF4D29 /* Swiftx-watchOS */, 584 | ); 585 | }; 586 | /* End PBXProject section */ 587 | 588 | /* Begin PBXReferenceProxy section */ 589 | 8240CD9B1C3A39D600EF4D29 /* SwiftCheck.framework */ = { 590 | isa = PBXReferenceProxy; 591 | fileType = wrapper.framework; 592 | path = SwiftCheck.framework; 593 | remoteRef = 8240CD9A1C3A39D600EF4D29 /* PBXContainerItemProxy */; 594 | sourceTree = BUILT_PRODUCTS_DIR; 595 | }; 596 | 8240CD9D1C3A39D600EF4D29 /* SwiftCheck-tvOSTests.xctest */ = { 597 | isa = PBXReferenceProxy; 598 | fileType = wrapper.cfbundle; 599 | path = "SwiftCheck-tvOSTests.xctest"; 600 | remoteRef = 8240CD9C1C3A39D600EF4D29 /* PBXContainerItemProxy */; 601 | sourceTree = BUILT_PRODUCTS_DIR; 602 | }; 603 | 82E51B8B1B5D4B8B003CA361 /* SwiftCheck.framework */ = { 604 | isa = PBXReferenceProxy; 605 | fileType = wrapper.framework; 606 | path = SwiftCheck.framework; 607 | remoteRef = 82E51B8A1B5D4B8B003CA361 /* PBXContainerItemProxy */; 608 | sourceTree = BUILT_PRODUCTS_DIR; 609 | }; 610 | 82E51B8D1B5D4B8B003CA361 /* SwiftCheckTests.xctest */ = { 611 | isa = PBXReferenceProxy; 612 | fileType = wrapper.cfbundle; 613 | path = SwiftCheckTests.xctest; 614 | remoteRef = 82E51B8C1B5D4B8B003CA361 /* PBXContainerItemProxy */; 615 | sourceTree = BUILT_PRODUCTS_DIR; 616 | }; 617 | 82E51B8F1B5D4B8B003CA361 /* SwiftCheck.framework */ = { 618 | isa = PBXReferenceProxy; 619 | fileType = wrapper.framework; 620 | path = SwiftCheck.framework; 621 | remoteRef = 82E51B8E1B5D4B8B003CA361 /* PBXContainerItemProxy */; 622 | sourceTree = BUILT_PRODUCTS_DIR; 623 | }; 624 | 82E51B911B5D4B8B003CA361 /* SwiftCheck-iOSTests.xctest */ = { 625 | isa = PBXReferenceProxy; 626 | fileType = wrapper.cfbundle; 627 | path = "SwiftCheck-iOSTests.xctest"; 628 | remoteRef = 82E51B901B5D4B8B003CA361 /* PBXContainerItemProxy */; 629 | sourceTree = BUILT_PRODUCTS_DIR; 630 | }; 631 | /* End PBXReferenceProxy section */ 632 | 633 | /* Begin PBXResourcesBuildPhase section */ 634 | 8240CD7F1C3A39D500EF4D29 /* Resources */ = { 635 | isa = PBXResourcesBuildPhase; 636 | buildActionMask = 2147483647; 637 | files = ( 638 | ); 639 | runOnlyForDeploymentPostprocessing = 0; 640 | }; 641 | 8240CD881C3A39D500EF4D29 /* Resources */ = { 642 | isa = PBXResourcesBuildPhase; 643 | buildActionMask = 2147483647; 644 | files = ( 645 | ); 646 | runOnlyForDeploymentPostprocessing = 0; 647 | }; 648 | 8240CDA31C3A39F000EF4D29 /* Resources */ = { 649 | isa = PBXResourcesBuildPhase; 650 | buildActionMask = 2147483647; 651 | files = ( 652 | ); 653 | runOnlyForDeploymentPostprocessing = 0; 654 | }; 655 | 84A88C871A70BD71003D53CF /* Resources */ = { 656 | isa = PBXResourcesBuildPhase; 657 | buildActionMask = 2147483647; 658 | files = ( 659 | ); 660 | runOnlyForDeploymentPostprocessing = 0; 661 | }; 662 | 84A88C921A70BD71003D53CF /* Resources */ = { 663 | isa = PBXResourcesBuildPhase; 664 | buildActionMask = 2147483647; 665 | files = ( 666 | ); 667 | runOnlyForDeploymentPostprocessing = 0; 668 | }; 669 | 84DF76661B0BDE0A00C912B0 /* Resources */ = { 670 | isa = PBXResourcesBuildPhase; 671 | buildActionMask = 2147483647; 672 | files = ( 673 | ); 674 | runOnlyForDeploymentPostprocessing = 0; 675 | }; 676 | 84DF76701B0BDE0A00C912B0 /* Resources */ = { 677 | isa = PBXResourcesBuildPhase; 678 | buildActionMask = 2147483647; 679 | files = ( 680 | ); 681 | runOnlyForDeploymentPostprocessing = 0; 682 | }; 683 | /* End PBXResourcesBuildPhase section */ 684 | 685 | /* Begin PBXSourcesBuildPhase section */ 686 | 8240CD7C1C3A39D500EF4D29 /* Sources */ = { 687 | isa = PBXSourcesBuildPhase; 688 | buildActionMask = 2147483647; 689 | files = ( 690 | 82F2D2831F765655009C32CC /* Error.swift in Sources */, 691 | 82F2D2741F76561E009C32CC /* Combinators.swift in Sources */, 692 | 82F2D28C1F765662009C32CC /* Array.swift in Sources */, 693 | 82F2D25A1F765545009C32CC /* Operators.swift in Sources */, 694 | 82F2D27F1F765655009C32CC /* Optional.swift in Sources */, 695 | 82F2D2871F765655009C32CC /* Either.swift in Sources */, 696 | ); 697 | runOnlyForDeploymentPostprocessing = 0; 698 | }; 699 | 8240CD861C3A39D500EF4D29 /* Sources */ = { 700 | isa = PBXSourcesBuildPhase; 701 | buildActionMask = 2147483647; 702 | files = ( 703 | 82FCDC441D73C4930011C27F /* EitherSpec.swift in Sources */, 704 | ); 705 | runOnlyForDeploymentPostprocessing = 0; 706 | }; 707 | 8240CDA01C3A39F000EF4D29 /* Sources */ = { 708 | isa = PBXSourcesBuildPhase; 709 | buildActionMask = 2147483647; 710 | files = ( 711 | 82F2D2841F765655009C32CC /* Error.swift in Sources */, 712 | 82F2D2751F76561E009C32CC /* Combinators.swift in Sources */, 713 | 82F2D28D1F765662009C32CC /* Array.swift in Sources */, 714 | 82F2D25B1F765545009C32CC /* Operators.swift in Sources */, 715 | 82F2D2801F765655009C32CC /* Optional.swift in Sources */, 716 | 82F2D2881F765655009C32CC /* Either.swift in Sources */, 717 | ); 718 | runOnlyForDeploymentPostprocessing = 0; 719 | }; 720 | 84A88C841A70BD71003D53CF /* Sources */ = { 721 | isa = PBXSourcesBuildPhase; 722 | buildActionMask = 2147483647; 723 | files = ( 724 | 82F2D2811F765655009C32CC /* Error.swift in Sources */, 725 | 82F2D2721F76561E009C32CC /* Combinators.swift in Sources */, 726 | 82F2D28A1F765662009C32CC /* Array.swift in Sources */, 727 | 82F2D2591F765545009C32CC /* Operators.swift in Sources */, 728 | 82F2D27D1F765655009C32CC /* Optional.swift in Sources */, 729 | 82F2D2851F765655009C32CC /* Either.swift in Sources */, 730 | ); 731 | runOnlyForDeploymentPostprocessing = 0; 732 | }; 733 | 84A88C901A70BD71003D53CF /* Sources */ = { 734 | isa = PBXSourcesBuildPhase; 735 | buildActionMask = 2147483647; 736 | files = ( 737 | 82FCDC421D73C4910011C27F /* EitherSpec.swift in Sources */, 738 | ); 739 | runOnlyForDeploymentPostprocessing = 0; 740 | }; 741 | 84DF76631B0BDE0A00C912B0 /* Sources */ = { 742 | isa = PBXSourcesBuildPhase; 743 | buildActionMask = 2147483647; 744 | files = ( 745 | 82F2D2821F765655009C32CC /* Error.swift in Sources */, 746 | 82F2D2731F76561E009C32CC /* Combinators.swift in Sources */, 747 | 82F2D28B1F765662009C32CC /* Array.swift in Sources */, 748 | 82F2D25C1F765545009C32CC /* Operators.swift in Sources */, 749 | 82F2D27E1F765655009C32CC /* Optional.swift in Sources */, 750 | 82F2D2861F765655009C32CC /* Either.swift in Sources */, 751 | ); 752 | runOnlyForDeploymentPostprocessing = 0; 753 | }; 754 | 84DF766E1B0BDE0A00C912B0 /* Sources */ = { 755 | isa = PBXSourcesBuildPhase; 756 | buildActionMask = 2147483647; 757 | files = ( 758 | 82FCDC431D73C4920011C27F /* EitherSpec.swift in Sources */, 759 | ); 760 | runOnlyForDeploymentPostprocessing = 0; 761 | }; 762 | /* End PBXSourcesBuildPhase section */ 763 | 764 | /* Begin PBXTargetDependency section */ 765 | 8240CD8D1C3A39D500EF4D29 /* PBXTargetDependency */ = { 766 | isa = PBXTargetDependency; 767 | target = 8240CD801C3A39D500EF4D29 /* Swiftx-tvOS */; 768 | targetProxy = 8240CD8C1C3A39D500EF4D29 /* PBXContainerItemProxy */; 769 | }; 770 | 8240CDCF1C3A401500EF4D29 /* PBXTargetDependency */ = { 771 | isa = PBXTargetDependency; 772 | name = "SwiftCheck-tvOS"; 773 | targetProxy = 8240CDCE1C3A401500EF4D29 /* PBXContainerItemProxy */; 774 | }; 775 | 826F9C18224E497900FA5106 /* PBXTargetDependency */ = { 776 | isa = PBXTargetDependency; 777 | name = "SwiftCheck-iOS"; 778 | targetProxy = 826F9C17224E497900FA5106 /* PBXContainerItemProxy */; 779 | }; 780 | 82E51B9B1B5D4BB9003CA361 /* PBXTargetDependency */ = { 781 | isa = PBXTargetDependency; 782 | name = SwiftCheck; 783 | targetProxy = 82E51B9A1B5D4BB9003CA361 /* PBXContainerItemProxy */; 784 | }; 785 | 84A88C971A70BD71003D53CF /* PBXTargetDependency */ = { 786 | isa = PBXTargetDependency; 787 | target = 84A88C881A70BD71003D53CF /* Swiftx */; 788 | targetProxy = 84A88C961A70BD71003D53CF /* PBXContainerItemProxy */; 789 | }; 790 | 84DF76751B0BDE0A00C912B0 /* PBXTargetDependency */ = { 791 | isa = PBXTargetDependency; 792 | target = 84DF76671B0BDE0A00C912B0 /* Swiftx-iOS */; 793 | targetProxy = 84DF76741B0BDE0A00C912B0 /* PBXContainerItemProxy */; 794 | }; 795 | /* End PBXTargetDependency section */ 796 | 797 | /* Begin XCBuildConfiguration section */ 798 | 8240CD921C3A39D600EF4D29 /* Debug */ = { 799 | isa = XCBuildConfiguration; 800 | buildSettings = { 801 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 802 | DEBUG_INFORMATION_FORMAT = dwarf; 803 | DEFINES_MODULE = YES; 804 | DYLIB_COMPATIBILITY_VERSION = 1; 805 | DYLIB_CURRENT_VERSION = 1; 806 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 807 | GCC_NO_COMMON_BLOCKS = YES; 808 | INFOPLIST_FILE = Sources/Info.plist; 809 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 810 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 811 | OTHER_SWIFT_FLAGS = ""; 812 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-tvOS"; 813 | PRODUCT_NAME = Swiftx; 814 | SDKROOT = appletvos; 815 | SKIP_INSTALL = YES; 816 | SWIFT_INSTALL_OBJC_HEADER = NO; 817 | SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; 818 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 819 | SWIFT_VERSION = 4.0; 820 | TARGETED_DEVICE_FAMILY = 3; 821 | TVOS_DEPLOYMENT_TARGET = 9.1; 822 | }; 823 | name = Debug; 824 | }; 825 | 8240CD931C3A39D600EF4D29 /* Release */ = { 826 | isa = XCBuildConfiguration; 827 | buildSettings = { 828 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 829 | DEFINES_MODULE = YES; 830 | DYLIB_COMPATIBILITY_VERSION = 1; 831 | DYLIB_CURRENT_VERSION = 1; 832 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 833 | GCC_NO_COMMON_BLOCKS = YES; 834 | INFOPLIST_FILE = Sources/Info.plist; 835 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 836 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 837 | OTHER_SWIFT_FLAGS = ""; 838 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-tvOS"; 839 | PRODUCT_NAME = Swiftx; 840 | SDKROOT = appletvos; 841 | SKIP_INSTALL = YES; 842 | SWIFT_INSTALL_OBJC_HEADER = NO; 843 | SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; 844 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 845 | SWIFT_VERSION = 4.0; 846 | TARGETED_DEVICE_FAMILY = 3; 847 | TVOS_DEPLOYMENT_TARGET = 9.1; 848 | VALIDATE_PRODUCT = YES; 849 | }; 850 | name = Release; 851 | }; 852 | 8240CD941C3A39D600EF4D29 /* Debug */ = { 853 | isa = XCBuildConfiguration; 854 | buildSettings = { 855 | APPLICATION_EXTENSION_API_ONLY = NO; 856 | DEBUG_INFORMATION_FORMAT = dwarf; 857 | GCC_NO_COMMON_BLOCKS = YES; 858 | INFOPLIST_FILE = Tests/Info.plist; 859 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 860 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-tvOSTests"; 861 | PRODUCT_NAME = "$(TARGET_NAME)"; 862 | SDKROOT = appletvos; 863 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 864 | SWIFT_VERSION = 4.0; 865 | TVOS_DEPLOYMENT_TARGET = 9.1; 866 | }; 867 | name = Debug; 868 | }; 869 | 8240CD951C3A39D600EF4D29 /* Release */ = { 870 | isa = XCBuildConfiguration; 871 | buildSettings = { 872 | APPLICATION_EXTENSION_API_ONLY = NO; 873 | GCC_NO_COMMON_BLOCKS = YES; 874 | INFOPLIST_FILE = Tests/Info.plist; 875 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 876 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-tvOSTests"; 877 | PRODUCT_NAME = "$(TARGET_NAME)"; 878 | SDKROOT = appletvos; 879 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 880 | SWIFT_VERSION = 4.0; 881 | TVOS_DEPLOYMENT_TARGET = 9.1; 882 | VALIDATE_PRODUCT = YES; 883 | }; 884 | name = Release; 885 | }; 886 | 8240CDAB1C3A39F000EF4D29 /* Debug */ = { 887 | isa = XCBuildConfiguration; 888 | buildSettings = { 889 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 890 | DEBUG_INFORMATION_FORMAT = dwarf; 891 | DEFINES_MODULE = YES; 892 | DYLIB_COMPATIBILITY_VERSION = 1; 893 | DYLIB_CURRENT_VERSION = 1; 894 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 895 | GCC_NO_COMMON_BLOCKS = YES; 896 | INFOPLIST_FILE = Sources/Info.plist; 897 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 898 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 899 | OTHER_SWIFT_FLAGS = ""; 900 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-watchOS"; 901 | PRODUCT_NAME = Swiftx; 902 | SDKROOT = watchos; 903 | SKIP_INSTALL = YES; 904 | SWIFT_INSTALL_OBJC_HEADER = NO; 905 | SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; 906 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 907 | SWIFT_VERSION = 4.0; 908 | TARGETED_DEVICE_FAMILY = 4; 909 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 910 | }; 911 | name = Debug; 912 | }; 913 | 8240CDAC1C3A39F000EF4D29 /* Release */ = { 914 | isa = XCBuildConfiguration; 915 | buildSettings = { 916 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 917 | DEFINES_MODULE = YES; 918 | DYLIB_COMPATIBILITY_VERSION = 1; 919 | DYLIB_CURRENT_VERSION = 1; 920 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 921 | GCC_NO_COMMON_BLOCKS = YES; 922 | INFOPLIST_FILE = Sources/Info.plist; 923 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 924 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 925 | OTHER_SWIFT_FLAGS = ""; 926 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.Swiftx-watchOS"; 927 | PRODUCT_NAME = Swiftx; 928 | SDKROOT = watchos; 929 | SKIP_INSTALL = YES; 930 | SWIFT_INSTALL_OBJC_HEADER = NO; 931 | SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; 932 | SWIFT_SWIFT3_OBJC_INFERENCE = Off; 933 | SWIFT_VERSION = 4.0; 934 | TARGETED_DEVICE_FAMILY = 4; 935 | VALIDATE_PRODUCT = YES; 936 | WATCHOS_DEPLOYMENT_TARGET = 2.1; 937 | }; 938 | name = Release; 939 | }; 940 | 84A88C9D1A70BD71003D53CF /* Debug */ = { 941 | isa = XCBuildConfiguration; 942 | buildSettings = { 943 | ALWAYS_SEARCH_USER_PATHS = NO; 944 | APPLICATION_EXTENSION_API_ONLY = YES; 945 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 946 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 947 | CLANG_CXX_LIBRARY = "libc++"; 948 | CLANG_ENABLE_MODULES = YES; 949 | CLANG_ENABLE_OBJC_ARC = YES; 950 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 951 | CLANG_WARN_BOOL_CONVERSION = YES; 952 | CLANG_WARN_COMMA = YES; 953 | CLANG_WARN_CONSTANT_CONVERSION = YES; 954 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 955 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 956 | CLANG_WARN_EMPTY_BODY = YES; 957 | CLANG_WARN_ENUM_CONVERSION = YES; 958 | CLANG_WARN_INFINITE_RECURSION = YES; 959 | CLANG_WARN_INT_CONVERSION = YES; 960 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 961 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 962 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 963 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 964 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 965 | CLANG_WARN_STRICT_PROTOTYPES = YES; 966 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 967 | CLANG_WARN_UNREACHABLE_CODE = YES; 968 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 969 | COPY_PHASE_STRIP = NO; 970 | CURRENT_PROJECT_VERSION = 1; 971 | ENABLE_STRICT_OBJC_MSGSEND = YES; 972 | ENABLE_TESTABILITY = YES; 973 | GCC_C_LANGUAGE_STANDARD = gnu99; 974 | GCC_DYNAMIC_NO_PIC = NO; 975 | GCC_NO_COMMON_BLOCKS = YES; 976 | GCC_OPTIMIZATION_LEVEL = 0; 977 | GCC_PREPROCESSOR_DEFINITIONS = ( 978 | "DEBUG=1", 979 | "$(inherited)", 980 | ); 981 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 982 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 983 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 984 | GCC_WARN_UNDECLARED_SELECTOR = YES; 985 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 986 | GCC_WARN_UNUSED_FUNCTION = YES; 987 | GCC_WARN_UNUSED_VARIABLE = YES; 988 | MACOSX_DEPLOYMENT_TARGET = 10.10; 989 | MTL_ENABLE_DEBUG_INFO = YES; 990 | ONLY_ACTIVE_ARCH = YES; 991 | SDKROOT = macosx; 992 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 993 | VERSIONING_SYSTEM = "apple-generic"; 994 | VERSION_INFO_PREFIX = ""; 995 | }; 996 | name = Debug; 997 | }; 998 | 84A88C9E1A70BD71003D53CF /* Release */ = { 999 | isa = XCBuildConfiguration; 1000 | buildSettings = { 1001 | ALWAYS_SEARCH_USER_PATHS = NO; 1002 | APPLICATION_EXTENSION_API_ONLY = YES; 1003 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 1004 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1005 | CLANG_CXX_LIBRARY = "libc++"; 1006 | CLANG_ENABLE_MODULES = YES; 1007 | CLANG_ENABLE_OBJC_ARC = YES; 1008 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 1009 | CLANG_WARN_BOOL_CONVERSION = YES; 1010 | CLANG_WARN_COMMA = YES; 1011 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1012 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 1013 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1014 | CLANG_WARN_EMPTY_BODY = YES; 1015 | CLANG_WARN_ENUM_CONVERSION = YES; 1016 | CLANG_WARN_INFINITE_RECURSION = YES; 1017 | CLANG_WARN_INT_CONVERSION = YES; 1018 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 1019 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 1020 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 1021 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1022 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 1023 | CLANG_WARN_STRICT_PROTOTYPES = YES; 1024 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1025 | CLANG_WARN_UNREACHABLE_CODE = YES; 1026 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1027 | COPY_PHASE_STRIP = NO; 1028 | CURRENT_PROJECT_VERSION = 1; 1029 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1030 | ENABLE_NS_ASSERTIONS = NO; 1031 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1032 | GCC_C_LANGUAGE_STANDARD = gnu99; 1033 | GCC_NO_COMMON_BLOCKS = YES; 1034 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1035 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1036 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1037 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1038 | GCC_WARN_UNUSED_FUNCTION = YES; 1039 | GCC_WARN_UNUSED_VARIABLE = YES; 1040 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1041 | MTL_ENABLE_DEBUG_INFO = NO; 1042 | SDKROOT = macosx; 1043 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 1044 | VERSIONING_SYSTEM = "apple-generic"; 1045 | VERSION_INFO_PREFIX = ""; 1046 | }; 1047 | name = Release; 1048 | }; 1049 | 84A88CA01A70BD71003D53CF /* Debug */ = { 1050 | isa = XCBuildConfiguration; 1051 | buildSettings = { 1052 | COMBINE_HIDPI_IMAGES = YES; 1053 | DEFINES_MODULE = YES; 1054 | DYLIB_COMPATIBILITY_VERSION = 1; 1055 | DYLIB_CURRENT_VERSION = 1; 1056 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1057 | FRAMEWORK_VERSION = A; 1058 | INFOPLIST_FILE = Sources/Info.plist; 1059 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1060 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 1061 | OTHER_SWIFT_FLAGS = ""; 1062 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.(PRODUCT_NAME:rfc1034identifier)"; 1063 | PRODUCT_NAME = "$(TARGET_NAME)"; 1064 | SKIP_INSTALL = YES; 1065 | SWIFT_VERSION = 5.0; 1066 | }; 1067 | name = Debug; 1068 | }; 1069 | 84A88CA11A70BD71003D53CF /* Release */ = { 1070 | isa = XCBuildConfiguration; 1071 | buildSettings = { 1072 | COMBINE_HIDPI_IMAGES = YES; 1073 | DEFINES_MODULE = YES; 1074 | DYLIB_COMPATIBILITY_VERSION = 1; 1075 | DYLIB_CURRENT_VERSION = 1; 1076 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1077 | FRAMEWORK_VERSION = A; 1078 | INFOPLIST_FILE = Sources/Info.plist; 1079 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1080 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 1081 | OTHER_SWIFT_FLAGS = ""; 1082 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.(PRODUCT_NAME:rfc1034identifier)"; 1083 | PRODUCT_NAME = "$(TARGET_NAME)"; 1084 | SKIP_INSTALL = YES; 1085 | SWIFT_VERSION = 5.0; 1086 | }; 1087 | name = Release; 1088 | }; 1089 | 84A88CA31A70BD71003D53CF /* Debug */ = { 1090 | isa = XCBuildConfiguration; 1091 | buildSettings = { 1092 | APPLICATION_EXTENSION_API_ONLY = NO; 1093 | COMBINE_HIDPI_IMAGES = YES; 1094 | FRAMEWORK_SEARCH_PATHS = ( 1095 | "$(DEVELOPER_FRAMEWORKS_DIR)", 1096 | "$(inherited)", 1097 | ); 1098 | GCC_PREPROCESSOR_DEFINITIONS = ( 1099 | "DEBUG=1", 1100 | "$(inherited)", 1101 | ); 1102 | INFOPLIST_FILE = Tests/Info.plist; 1103 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 1104 | PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; 1105 | PRODUCT_NAME = "$(TARGET_NAME)"; 1106 | SWIFT_VERSION = 5.0; 1107 | }; 1108 | name = Debug; 1109 | }; 1110 | 84A88CA41A70BD71003D53CF /* Release */ = { 1111 | isa = XCBuildConfiguration; 1112 | buildSettings = { 1113 | APPLICATION_EXTENSION_API_ONLY = NO; 1114 | COMBINE_HIDPI_IMAGES = YES; 1115 | FRAMEWORK_SEARCH_PATHS = ( 1116 | "$(DEVELOPER_FRAMEWORKS_DIR)", 1117 | "$(inherited)", 1118 | ); 1119 | INFOPLIST_FILE = Tests/Info.plist; 1120 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 1121 | PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; 1122 | PRODUCT_NAME = "$(TARGET_NAME)"; 1123 | SWIFT_VERSION = 5.0; 1124 | }; 1125 | name = Release; 1126 | }; 1127 | 84DF767C1B0BDE0A00C912B0 /* Debug */ = { 1128 | isa = XCBuildConfiguration; 1129 | buildSettings = { 1130 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 1131 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1132 | DEFINES_MODULE = YES; 1133 | DYLIB_COMPATIBILITY_VERSION = 1; 1134 | DYLIB_CURRENT_VERSION = 1; 1135 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1136 | GCC_NO_COMMON_BLOCKS = YES; 1137 | GCC_PREPROCESSOR_DEFINITIONS = ( 1138 | "DEBUG=1", 1139 | "$(inherited)", 1140 | ); 1141 | INFOPLIST_FILE = Sources/Info.plist; 1142 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1143 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1144 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1145 | OTHER_SWIFT_FLAGS = ""; 1146 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.(PRODUCT_NAME:rfc1034identifier)"; 1147 | PRODUCT_NAME = Swiftx; 1148 | SDKROOT = iphoneos; 1149 | SKIP_INSTALL = YES; 1150 | SWIFT_VERSION = 5.0; 1151 | TARGETED_DEVICE_FAMILY = "1,2"; 1152 | }; 1153 | name = Debug; 1154 | }; 1155 | 84DF767D1B0BDE0A00C912B0 /* Release */ = { 1156 | isa = XCBuildConfiguration; 1157 | buildSettings = { 1158 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 1159 | DEFINES_MODULE = YES; 1160 | DYLIB_COMPATIBILITY_VERSION = 1; 1161 | DYLIB_CURRENT_VERSION = 1; 1162 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1163 | GCC_NO_COMMON_BLOCKS = YES; 1164 | INFOPLIST_FILE = Sources/Info.plist; 1165 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1166 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1167 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1168 | OTHER_SWIFT_FLAGS = ""; 1169 | PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.(PRODUCT_NAME:rfc1034identifier)"; 1170 | PRODUCT_NAME = Swiftx; 1171 | SDKROOT = iphoneos; 1172 | SKIP_INSTALL = YES; 1173 | SWIFT_VERSION = 5.0; 1174 | TARGETED_DEVICE_FAMILY = "1,2"; 1175 | VALIDATE_PRODUCT = YES; 1176 | }; 1177 | name = Release; 1178 | }; 1179 | 84DF767F1B0BDE0A00C912B0 /* Debug */ = { 1180 | isa = XCBuildConfiguration; 1181 | buildSettings = { 1182 | APPLICATION_EXTENSION_API_ONLY = NO; 1183 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1184 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1185 | DEVELOPMENT_TEAM = D33M56YTC8; 1186 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 1187 | GCC_NO_COMMON_BLOCKS = YES; 1188 | GCC_PREPROCESSOR_DEFINITIONS = ( 1189 | "DEBUG=1", 1190 | "$(inherited)", 1191 | ); 1192 | INFOPLIST_FILE = Tests/Info.plist; 1193 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 1194 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1195 | PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; 1196 | PRODUCT_NAME = "$(TARGET_NAME)"; 1197 | SDKROOT = iphoneos; 1198 | SWIFT_VERSION = 5.0; 1199 | }; 1200 | name = Debug; 1201 | }; 1202 | 84DF76801B0BDE0A00C912B0 /* Release */ = { 1203 | isa = XCBuildConfiguration; 1204 | buildSettings = { 1205 | APPLICATION_EXTENSION_API_ONLY = NO; 1206 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1207 | DEVELOPMENT_TEAM = D33M56YTC8; 1208 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 1209 | GCC_NO_COMMON_BLOCKS = YES; 1210 | INFOPLIST_FILE = Tests/Info.plist; 1211 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 1212 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1213 | PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; 1214 | PRODUCT_NAME = "$(TARGET_NAME)"; 1215 | SDKROOT = iphoneos; 1216 | SWIFT_VERSION = 5.0; 1217 | VALIDATE_PRODUCT = YES; 1218 | }; 1219 | name = Release; 1220 | }; 1221 | /* End XCBuildConfiguration section */ 1222 | 1223 | /* Begin XCConfigurationList section */ 1224 | 8240CD9E1C3A39D600EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-tvOS" */ = { 1225 | isa = XCConfigurationList; 1226 | buildConfigurations = ( 1227 | 8240CD921C3A39D600EF4D29 /* Debug */, 1228 | 8240CD931C3A39D600EF4D29 /* Release */, 1229 | ); 1230 | defaultConfigurationIsVisible = 0; 1231 | defaultConfigurationName = Release; 1232 | }; 1233 | 8240CD9F1C3A39D600EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-tvOSTests" */ = { 1234 | isa = XCConfigurationList; 1235 | buildConfigurations = ( 1236 | 8240CD941C3A39D600EF4D29 /* Debug */, 1237 | 8240CD951C3A39D600EF4D29 /* Release */, 1238 | ); 1239 | defaultConfigurationIsVisible = 0; 1240 | defaultConfigurationName = Release; 1241 | }; 1242 | 8240CDAA1C3A39F000EF4D29 /* Build configuration list for PBXNativeTarget "Swiftx-watchOS" */ = { 1243 | isa = XCConfigurationList; 1244 | buildConfigurations = ( 1245 | 8240CDAB1C3A39F000EF4D29 /* Debug */, 1246 | 8240CDAC1C3A39F000EF4D29 /* Release */, 1247 | ); 1248 | defaultConfigurationIsVisible = 0; 1249 | defaultConfigurationName = Release; 1250 | }; 1251 | 84A88C831A70BD71003D53CF /* Build configuration list for PBXProject "Swiftx" */ = { 1252 | isa = XCConfigurationList; 1253 | buildConfigurations = ( 1254 | 84A88C9D1A70BD71003D53CF /* Debug */, 1255 | 84A88C9E1A70BD71003D53CF /* Release */, 1256 | ); 1257 | defaultConfigurationIsVisible = 0; 1258 | defaultConfigurationName = Release; 1259 | }; 1260 | 84A88C9F1A70BD71003D53CF /* Build configuration list for PBXNativeTarget "Swiftx" */ = { 1261 | isa = XCConfigurationList; 1262 | buildConfigurations = ( 1263 | 84A88CA01A70BD71003D53CF /* Debug */, 1264 | 84A88CA11A70BD71003D53CF /* Release */, 1265 | ); 1266 | defaultConfigurationIsVisible = 0; 1267 | defaultConfigurationName = Release; 1268 | }; 1269 | 84A88CA21A70BD71003D53CF /* Build configuration list for PBXNativeTarget "SwiftxTests" */ = { 1270 | isa = XCConfigurationList; 1271 | buildConfigurations = ( 1272 | 84A88CA31A70BD71003D53CF /* Debug */, 1273 | 84A88CA41A70BD71003D53CF /* Release */, 1274 | ); 1275 | defaultConfigurationIsVisible = 0; 1276 | defaultConfigurationName = Release; 1277 | }; 1278 | 84DF767B1B0BDE0A00C912B0 /* Build configuration list for PBXNativeTarget "Swiftx-iOS" */ = { 1279 | isa = XCConfigurationList; 1280 | buildConfigurations = ( 1281 | 84DF767C1B0BDE0A00C912B0 /* Debug */, 1282 | 84DF767D1B0BDE0A00C912B0 /* Release */, 1283 | ); 1284 | defaultConfigurationIsVisible = 0; 1285 | defaultConfigurationName = Release; 1286 | }; 1287 | 84DF767E1B0BDE0A00C912B0 /* Build configuration list for PBXNativeTarget "Swiftx-iOSTests" */ = { 1288 | isa = XCConfigurationList; 1289 | buildConfigurations = ( 1290 | 84DF767F1B0BDE0A00C912B0 /* Debug */, 1291 | 84DF76801B0BDE0A00C912B0 /* Release */, 1292 | ); 1293 | defaultConfigurationIsVisible = 0; 1294 | defaultConfigurationName = Release; 1295 | }; 1296 | /* End XCConfigurationList section */ 1297 | }; 1298 | rootObject = 84A88C801A70BD71003D53CF /* Project object */; 1299 | } 1300 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/xcshareddata/xcschemes/Swiftx-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 79 | 85 | 86 | 87 | 88 | 89 | 90 | 96 | 97 | 103 | 104 | 105 | 106 | 108 | 109 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/xcshareddata/xcschemes/Swiftx-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/xcshareddata/xcschemes/Swiftx-watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/xcshareddata/xcschemes/Swiftx.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Swiftx.xcodeproj/xcshareddata/xcschemes/SwiftxTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LinuxMain.swift 3 | // SwiftCheck 4 | // 5 | // Created by Robert Widmann on 9/18/16. 6 | // Copyright © 2016 Typelift. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | @testable import SwiftxTests 12 | 13 | #if !os(macOS) 14 | XCTMain([ 15 | EitherSpec.allTests, 16 | ]) 17 | #endif 18 | -------------------------------------------------------------------------------- /Tests/SwiftxTests/EitherSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EitherSpec.swift 3 | // Swiftx 4 | // 5 | // Created by Robert Widmann on 7/16/15. 6 | // Copyright © 2015 TypeLift. All rights reserved. 7 | // 8 | 9 | import Swiftx 10 | import XCTest 11 | import SwiftCheck 12 | #if SWIFT_PACKAGE 13 | import Operadics 14 | #endif 15 | 16 | extension Either where L : Arbitrary, R : Arbitrary { 17 | static var arbitrary : Gen> { 18 | return Gen.one(of: [ 19 | L.arbitrary.map(Either.Left), 20 | R.arbitrary.map(Either.Right), 21 | ]) 22 | } 23 | 24 | static func shrink(_ e : Either) -> [Either] { 25 | switch e { 26 | case .Left(let x): 27 | return L.shrink(x).map(Either.Left) 28 | case .Right(let x): 29 | return R.shrink(x).map(Either.Right) 30 | } 31 | } 32 | } 33 | 34 | // Heterogenous equality 35 | public func == (lhs : Either, rhs : Either) -> Bool { 36 | switch (lhs, rhs) { 37 | case let (.Left(l), .Left(r)) where l == r: 38 | return true 39 | default: 40 | return false 41 | } 42 | } 43 | 44 | public func == (lhs : Either, rhs : Either) -> Bool { 45 | switch (lhs, rhs) { 46 | case let (.Right(l), .Right(r)) where l == r: 47 | return true 48 | default: 49 | return false 50 | } 51 | } 52 | 53 | class EitherSpec : XCTestCase { 54 | func testProperties() { 55 | property("isLeft behaves") <- forAllShrink(Either.arbitrary, shrinker: Either.shrink) { e in 56 | return e.isLeft == e.fold(true, f: const(false)) 57 | } 58 | 59 | property("isRight behaves") <- forAllShrink(Either.arbitrary, shrinker: Either.shrink) { e in 60 | return e.isRight == e.fold(false, f: const(true)) 61 | } 62 | 63 | property("left and right behave") <- forAllShrink(Either.arbitrary, shrinker: Either.shrink) { e in 64 | return (e.isLeft && e.left != nil) || (e.isRight && e.right != nil) 65 | } 66 | 67 | property("either is equivalent to explicit case analysis") <- forAllShrink(Either.arbitrary, shrinker: Either.shrink) { e in 68 | return forAll { (f : ArrowOf) in 69 | let s : String 70 | switch e { 71 | case .Left(let x): 72 | s = f.getArrow(x) 73 | case .Right(let x): 74 | s = f.getArrow(x) 75 | } 76 | return e.either(onLeft: f.getArrow, onRight: f.getArrow) == s 77 | } 78 | } 79 | 80 | property("flatMap preserves .Left") <- forAllShrink(Either.arbitrary, shrinker: Either.shrink) { e in 81 | return forAll { (f : ArrowOf) in 82 | switch e { 83 | case .Left(_): 84 | return e.flatMap(Either.Right • f.getArrow) == e 85 | case .Right(_): 86 | return Discard() 87 | } 88 | } 89 | } 90 | } 91 | 92 | #if !(os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) 93 | static var allTests = testCase([ 94 | ("testProperties", testProperties), 95 | ]) 96 | #endif 97 | } 98 | --------------------------------------------------------------------------------