diff --git a/.swift-version b/.swift-version index 5186d07..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +5.0 diff --git a/.travis.yml b/.travis.yml index f7e251c..30cb210 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,16 +5,15 @@ matrix: include: - os: osx language: objective-c - osx_image: xcode9.3 + osx_image: xcode10.2 before_install: - git submodule update --init --recursive script: - # Restore pod build before shipping for 3.0 - # - pod lib lint + - pod lib lint - carthage build --no-skip-current - os: osx language: objective-c - osx_image: xcode9.3 + osx_image: xcode10.2 before_install: - git submodule update --init --recursive script: @@ -31,9 +30,9 @@ matrix: before_install: - git submodule update --init --recursive - wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import - - - wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz - - tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz - - export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}" + - wget https://swift.org/builds/swift-5.0-release/ubuntu1404/swift-5.0-RELEASE/swift-5.0-RELEASE-ubuntu14.04.tar.gz + - tar xzf swift-5.0-RELEASE-ubuntu14.04.tar.gz + - export PATH=${PWD}/swift-5.0-RELEASE-ubuntu14.04/usr/bin:"${PATH}" script: - swift test notifications: diff --git a/Cartfile.resolved b/Cartfile.resolved index c258ead..0ae3264 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ -github "typelift/Operadics" "0.3.0" -github "typelift/SwiftCheck" "0.10.0" -github "typelift/Swiftx" "0.7.0" +github "typelift/Operadics" "0.4.0" +github "typelift/SwiftCheck" "0.12.0" +github "typelift/Swiftx" "0.8.0" diff --git a/Carthage/Checkouts/Operadics b/Carthage/Checkouts/Operadics index c2a1491..ef9c00e 160000 --- a/Carthage/Checkouts/Operadics +++ b/Carthage/Checkouts/Operadics @@ -1 +1 @@ -Subproject commit c2a14919b3653a39a9bf268c1ae0bf71ad6833fe +Subproject commit ef9c00e70ac4e5fba046f4eae3bd4e4e8f058648 diff --git a/Carthage/Checkouts/SwiftCheck b/Carthage/Checkouts/SwiftCheck index 43ffe7a..077c096 160000 --- a/Carthage/Checkouts/SwiftCheck +++ b/Carthage/Checkouts/SwiftCheck @@ -1 +1 @@ -Subproject commit 43ffe7ab48366c36a697c54bcdd257876edd6fc6 +Subproject commit 077c096c3ddfc38db223ac8e525ad16ffb987138 diff --git a/Carthage/Checkouts/Swiftx b/Carthage/Checkouts/Swiftx index 7c1d3e4..4affb64 160000 --- a/Carthage/Checkouts/Swiftx +++ b/Carthage/Checkouts/Swiftx @@ -1 +1 @@ -Subproject commit 7c1d3e4bd0db0fd09623e12b2f5863db9f37becb +Subproject commit 4affb6451b6981cf56c2ec1287aaee3406a5e5e0 diff --git a/Sources/Swiftz/Function.swift b/Sources/Swiftz/Function.swift index 4a06f8a..f6c7166 100644 --- a/Sources/Swiftz/Function.swift +++ b/Sources/Swiftz/Function.swift @@ -118,6 +118,8 @@ extension Function /*: ArrowApply*/ { } } +/* +FIXME: This cannot work with strictness. extension Function /*: ArrowLoop*/ { public typealias LOOP = Function<(A, D), (B, D)> @@ -125,3 +127,5 @@ extension Function /*: ArrowLoop*/ { return Function.arr(Function.loop(f).apply) } } +*/ + diff --git a/Sources/Swiftz/List.swift b/Sources/Swiftz/List.swift index c27cb81..a989370 100644 --- a/Sources/Swiftz/List.swift +++ b/Sources/Swiftz/List.swift @@ -437,12 +437,6 @@ public struct List { return (snd • ev) <^> self.find({ ev($0).0 == key }) } - /// Returns a List of an infinite number of iteratations of applications of - /// a function to an initial value. - public static func iterate(_ f : @escaping (Element) -> Element, initial : Element) -> List { - return List(initial, self.iterate(f, initial: f(initial))) - } - /// Cycles a finite list into an infinite list. public func cycle() -> List { let (hd, tl) = self.next() diff --git a/Sources/Swiftz/OptionalExt.swift b/Sources/Swiftz/OptionalExt.swift index 8f11266..a072076 100644 --- a/Sources/Swiftz/OptionalExt.swift +++ b/Sources/Swiftz/OptionalExt.swift @@ -178,10 +178,10 @@ extension Optional /*: Foldable*/ { } extension Optional : Sequence { - public typealias Iterator = IteratorOverOne + public typealias Iterator = CollectionOfOne.Iterator - public func makeIterator() -> IteratorOverOne { - return IteratorOverOne(_elements: self) + public func makeIterator() -> CollectionOfOne.Iterator { + return CollectionOfOne.Iterator(_elements: self) } } diff --git a/Sources/Swiftz/Unit.swift b/Sources/Swiftz/Unit.swift index f755a16..a3f499f 100644 --- a/Sources/Swiftz/Unit.swift +++ b/Sources/Swiftz/Unit.swift @@ -52,9 +52,7 @@ public func >(l : Unit, r : Unit) -> Bool { } extension Unit : Hashable { - public var hashValue : Int { - return 0 - } + public func hash(into hasher: inout Hasher) { } } extension Unit : Monoid { diff --git a/Swiftz.xcodeproj/project.pbxproj b/Swiftz.xcodeproj/project.pbxproj index 7e7165a..8f6dc55 100644 --- a/Swiftz.xcodeproj/project.pbxproj +++ b/Swiftz.xcodeproj/project.pbxproj @@ -869,7 +869,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = TypeLift; TargetAttributes = { 8240CD1B1C3A395F00EF4D29 = { @@ -886,28 +886,29 @@ }; 84A88F971A71DF7F003D53CF = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 84A88FA21A71DF7F003D53CF = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 84DF751D1B0BD17700C912B0 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; 84DF75271B0BD17700C912B0 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = 84A88F921A71DF7F003D53CF /* Build configuration list for PBXProject "Swiftz" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 84A88F8E1A71DF7F003D53CF; productRefGroup = 84A88F991A71DF7F003D53CF /* Products */; @@ -1489,6 +1490,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1547,6 +1549,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -1614,8 +1617,7 @@ SWIFT_INSTALL_OBJC_HEADER = NO; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1639,8 +1641,7 @@ SKIP_INSTALL = YES; SWIFT_INSTALL_OBJC_HEADER = NO; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1664,8 +1665,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1684,8 +1684,7 @@ OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1714,8 +1713,7 @@ SKIP_INSTALL = YES; SWIFT_INSTALL_OBJC_HEADER = NO; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -1740,8 +1738,7 @@ SKIP_INSTALL = YES; SWIFT_INSTALL_OBJC_HEADER = NO; SWIFT_OBJC_INTERFACE_HEADER_NAME = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -1771,8 +1768,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1794,8 +1790,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "io.maxs.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/Swiftz.xcodeproj/xcshareddata/xcschemes/Swiftz-iOS.xcscheme b/Swiftz.xcodeproj/xcshareddata/xcschemes/Swiftz-iOS.xcscheme index 79c58c8..a60c329 100644 --- a/Swiftz.xcodeproj/xcshareddata/xcschemes/Swiftz-iOS.xcscheme +++ b/Swiftz.xcodeproj/xcshareddata/xcschemes/Swiftz-iOS.xcscheme @@ -1,6 +1,6 @@