Skip to content

Commit 9c1ca43

Browse files
authored
Merge pull request #8 from adamkuipers/swift-2.2
Swift 2.2
2 parents 155244c + bc52018 commit 9c1ca43

File tree

18 files changed

+46
-386
lines changed

18 files changed

+46
-386
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
language: objective-c
2-
osx_image: xcode7.1
3-
before_install: true
4-
install: true
5-
script: script/cibuild Algebra Algebra-iOS
2+
osx_image: xcode7.3
3+
script:
4+
- set -o pipefail
5+
- xcodebuild test -scheme Algebra -configuration Debug | xcpretty -c
6+
- xcodebuild test -scheme Algebra-iOS -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 6s" | xcpretty -c
7+
68
notifications:
79
webhooks:
810
urls:

Algebra.xcodeproj/project.pbxproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
attributes = {
285285
LastSwiftMigration = 0710;
286286
LastSwiftUpdateCheck = 0710;
287-
LastUpgradeCheck = 0620;
287+
LastUpgradeCheck = 0730;
288288
ORGANIZATIONNAME = TypeLift;
289289
TargetAttributes = {
290290
841B54BC1A217FB20032E044 = {
@@ -437,6 +437,7 @@
437437
COPY_PHASE_STRIP = NO;
438438
CURRENT_PROJECT_VERSION = 1;
439439
ENABLE_STRICT_OBJC_MSGSEND = YES;
440+
ENABLE_TESTABILITY = YES;
440441
GCC_C_LANGUAGE_STANDARD = gnu99;
441442
GCC_DYNAMIC_NO_PIC = NO;
442443
GCC_OPTIMIZATION_LEVEL = 0;
@@ -511,6 +512,7 @@
511512
INFOPLIST_FILE = Algebra/Info.plist;
512513
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
513514
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
515+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
514516
PRODUCT_NAME = "$(TARGET_NAME)";
515517
SKIP_INSTALL = YES;
516518
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -530,6 +532,7 @@
530532
INFOPLIST_FILE = Algebra/Info.plist;
531533
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
532534
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
535+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
533536
PRODUCT_NAME = "$(TARGET_NAME)";
534537
SKIP_INSTALL = YES;
535538
};
@@ -549,6 +552,7 @@
549552
);
550553
INFOPLIST_FILE = AlgebraTests/Info.plist;
551554
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
555+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
552556
PRODUCT_NAME = "$(TARGET_NAME)";
553557
};
554558
name = Debug;
@@ -563,6 +567,7 @@
563567
);
564568
INFOPLIST_FILE = AlgebraTests/Info.plist;
565569
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
570+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
566571
PRODUCT_NAME = "$(TARGET_NAME)";
567572
};
568573
name = Release;
@@ -585,6 +590,7 @@
585590
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
586591
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
587592
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
593+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
588594
PRODUCT_NAME = Algebra;
589595
SDKROOT = iphoneos;
590596
SKIP_INSTALL = YES;
@@ -606,6 +612,7 @@
606612
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
607613
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
608614
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
615+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
609616
PRODUCT_NAME = Algebra;
610617
SDKROOT = iphoneos;
611618
SKIP_INSTALL = YES;
@@ -631,6 +638,7 @@
631638
INFOPLIST_FILE = AlgebraTests/Info.plist;
632639
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
633640
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
641+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
634642
PRODUCT_NAME = "$(TARGET_NAME)";
635643
SDKROOT = iphoneos;
636644
};
@@ -649,6 +657,7 @@
649657
INFOPLIST_FILE = AlgebraTests/Info.plist;
650658
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
651659
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
660+
PRODUCT_BUNDLE_IDENTIFIER = "com.typelift.$(PRODUCT_NAME:rfc1034identifier)";
652661
PRODUCT_NAME = "$(TARGET_NAME)";
653662
SDKROOT = iphoneos;
654663
VALIDATE_PRODUCT = YES;

Algebra.xcodeproj/xcshareddata/xcschemes/Algebra-iOS.xcscheme

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0630"
3+
LastUpgradeVersion = "0730"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -37,10 +37,10 @@
3737
</BuildActionEntries>
3838
</BuildAction>
3939
<TestAction
40+
buildConfiguration = "Debug"
4041
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4142
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42-
shouldUseLaunchSchemeArgsEnv = "YES"
43-
buildConfiguration = "Debug">
43+
shouldUseLaunchSchemeArgsEnv = "YES">
4444
<Testables>
4545
<TestableReference
4646
skipped = "NO">
@@ -62,15 +62,18 @@
6262
ReferencedContainer = "container:Algebra.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
69+
buildConfiguration = "Debug"
6770
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
6871
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6972
launchStyle = "0"
7073
useCustomWorkingDirectory = "NO"
71-
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<MacroExpansion>
7679
<BuildableReference
@@ -85,10 +88,10 @@
8588
</AdditionalOptions>
8689
</LaunchAction>
8790
<ProfileAction
91+
buildConfiguration = "Release"
8892
shouldUseLaunchSchemeArgsEnv = "YES"
8993
savedToolIdentifier = ""
9094
useCustomWorkingDirectory = "NO"
91-
buildConfiguration = "Release"
9295
debugDocumentVersioning = "YES">
9396
<MacroExpansion>
9497
<BuildableReference

Algebra.xcodeproj/xcshareddata/xcschemes/Algebra.xcscheme

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0630"
3+
LastUpgradeVersion = "0730"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -37,10 +37,10 @@
3737
</BuildActionEntries>
3838
</BuildAction>
3939
<TestAction
40+
buildConfiguration = "Debug"
4041
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4142
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42-
shouldUseLaunchSchemeArgsEnv = "YES"
43-
buildConfiguration = "Debug">
43+
shouldUseLaunchSchemeArgsEnv = "YES">
4444
<Testables>
4545
<TestableReference
4646
skipped = "NO">
@@ -62,15 +62,18 @@
6262
ReferencedContainer = "container:Algebra.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
69+
buildConfiguration = "Debug"
6770
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
6871
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
6972
launchStyle = "0"
7073
useCustomWorkingDirectory = "NO"
71-
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<MacroExpansion>
7679
<BuildableReference
@@ -85,10 +88,10 @@
8588
</AdditionalOptions>
8689
</LaunchAction>
8790
<ProfileAction
91+
buildConfiguration = "Release"
8892
shouldUseLaunchSchemeArgsEnv = "YES"
8993
savedToolIdentifier = ""
9094
useCustomWorkingDirectory = "NO"
91-
buildConfiguration = "Release"
9295
debugDocumentVersioning = "YES">
9396
<MacroExpansion>
9497
<BuildableReference

Algebra/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.typelift.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

Algebra/Lattice.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
/// A Join-Semilattice is a partially ordered set that defines a join operation (that is, has an
1010
/// operation that computes the least upper bound).
1111
protocol JoinSemilattice {
12-
typealias L
12+
associatedtype L
1313
static func join(_: L) -> L -> L
1414
}
1515

1616
/// A Meet-Semilattice is a partially ordered set that defines a meet operation (that is, has an
1717
/// operation that computes the greatest lower bound).
1818
protocol MeetSemilattice {
19-
typealias L
19+
associatedtype L
2020
static func meet(_: L) -> L -> L
2121
}
2222

Algebra/Magma.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
/// A magma is a set and a closed binary operator. It is usually not studied because it forms the
1010
/// basis of more interesting structures.
1111
protocol Magma {
12-
typealias M
13-
func <>(_: M, _: M) -> M
12+
associatedtype M
13+
func <> (_: M, _: M) -> M
1414
}

Algebra/Module.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88

99
/// If R is a Ring and M is an abelian group, a Left Module defines a binary operation R *<> M -> M.
1010
protocol LeftModule {
11-
typealias R : Semiring
12-
typealias M : Additive
13-
func *<>(_: R, _: M) -> M
11+
associatedtype R : Semiring
12+
associatedtype M : Additive
13+
func *<> (_: R, _: M) -> M
1414
}
1515

1616
/// If R is a Ring and M is an abelian group, a Right Module defines a binary operation M <>* R -> M.
1717
protocol RightModule {
18-
typealias R : Semiring
19-
typealias M : Additive
20-
func <>*(_: M, _: R) -> M
18+
associatedtype R : Semiring
19+
associatedtype M : Additive
20+
func <>* (_: M, _: R) -> M
2121
}
2222

2323
/// A bimodule is a module with compatible left and right operations.

Algebra/Monoid.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ protocol Additive : Semigroup {
2525
protocol Multiplicative : Semigroup {
2626
static func one() -> M
2727
}
28-
29-

Algebra/Semigroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
/// Magmas where the binary operator is associative. That is:
1010
///
1111
/// (S <> S) <> S == S <> (S <> S)
12-
protocol Semigroup : Magma { }
12+
protocol Semigroup : Magma { }

0 commit comments

Comments
 (0)