Skip to content

Commit 6cc1136

Browse files
authored
Merge pull request #341 from CodaFi/touch-up
Update to Swift 5
2 parents 556236a + 125518d commit 6cc1136

File tree

15 files changed

+42
-52
lines changed

15 files changed

+42
-52
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
5.0

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ matrix:
55
include:
66
- os: osx
77
language: objective-c
8-
osx_image: xcode9.3
8+
osx_image: xcode10.2
99
before_install:
1010
- git submodule update --init --recursive
1111
script:
12-
# Restore pod build before shipping for 3.0
13-
# - pod lib lint
12+
- pod lib lint
1413
- carthage build --no-skip-current
1514
- os: osx
1615
language: objective-c
17-
osx_image: xcode9.3
16+
osx_image: xcode10.2
1817
before_install:
1918
- git submodule update --init --recursive
2019
script:
@@ -31,9 +30,9 @@ matrix:
3130
before_install:
3231
- git submodule update --init --recursive
3332
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
34-
- wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz
35-
- tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
36-
- export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
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}"
3736
script:
3837
- swift test
3938
notifications:

Cartfile.resolved

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
github "typelift/Operadics" "0.3.0"
2-
github "typelift/SwiftCheck" "0.10.0"
3-
github "typelift/Swiftx" "0.7.0"
1+
github "typelift/Operadics" "0.4.0"
2+
github "typelift/SwiftCheck" "0.12.0"
3+
github "typelift/Swiftx" "0.8.0"

Carthage/Checkouts/Operadics

Sources/Swiftz/Function.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,14 @@ extension Function /*: ArrowApply*/ {
118118
}
119119
}
120120

121+
/*
122+
FIXME: This cannot work with strictness.
121123
extension Function /*: ArrowLoop*/ {
122124
public typealias LOOP = Function<(A, D), (B, D)>
123125

124126
public static func loop<B, C>(_ f : Function<(B, D), (C, D)>) -> Function<B, C> {
125127
return Function<B, C>.arr(Function.loop(f).apply)
126128
}
127129
}
130+
*/
131+

Sources/Swiftz/List.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,6 @@ public struct List<Element> {
437437
return (snd ev) <^> self.find({ ev($0).0 == key })
438438
}
439439

440-
/// Returns a List of an infinite number of iteratations of applications of
441-
/// a function to an initial value.
442-
public static func iterate(_ f : @escaping (Element) -> Element, initial : Element) -> List<Element> {
443-
return List(initial, self.iterate(f, initial: f(initial)))
444-
}
445-
446440
/// Cycles a finite list into an infinite list.
447441
public func cycle() -> List<Element> {
448442
let (hd, tl) = self.next()

Sources/Swiftz/OptionalExt.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ extension Optional /*: Foldable*/ {
178178
}
179179

180180
extension Optional : Sequence {
181-
public typealias Iterator = IteratorOverOne<Wrapped>
181+
public typealias Iterator = CollectionOfOne<Wrapped>.Iterator
182182

183-
public func makeIterator() -> IteratorOverOne<Wrapped> {
184-
return IteratorOverOne(_elements: self)
183+
public func makeIterator() -> CollectionOfOne<Wrapped>.Iterator {
184+
return CollectionOfOne.Iterator(_elements: self)
185185
}
186186
}
187187

Sources/Swiftz/Unit.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ public func >(l : Unit, r : Unit) -> Bool {
5252
}
5353

5454
extension Unit : Hashable {
55-
public var hashValue : Int {
56-
return 0
57-
}
55+
public func hash(into hasher: inout Hasher) { }
5856
}
5957

6058
extension Unit : Monoid {

0 commit comments

Comments
 (0)