Skip to content

Commit 549e02d

Browse files
authored
Merge pull request #5 from CodaFi/instancetype
Instances
2 parents 9c1ca43 + e3422c0 commit 549e02d

24 files changed

+1036
-85
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ DerivedData
1717
*.hmap
1818
*.ipa
1919
*.xcuserstate
20+
*.xcscmblueprint
21+
Carthage/
2022

2123
# CocoaPods
2224
#

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "Carthage/Checkouts/Operadics"]
2+
path = Carthage/Checkouts/Operadics
3+
url = https://github.com/typelift/Operadics.git
4+
[submodule "Carthage/Checkouts/SwiftCheck"]
5+
path = Carthage/Checkouts/SwiftCheck
6+
url = https://github.com/typelift/SwiftCheck.git

.travis.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,53 @@
1-
language: objective-c
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-
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: xcode7.3
9+
before_install:
10+
- git submodule update --init --recursive
11+
script:
12+
# Restore pod build before shipping for 3.0
13+
# - pod lib lint
14+
- carthage build --no-skip-current
15+
- os: osx
16+
language: objective-c
17+
osx_image: xcode7.3
18+
before_install:
19+
- git submodule update --init --recursive
20+
script:
21+
- set -o pipefail
22+
- xcodebuild test -scheme Algebra | xcpretty -c
23+
# !!!: Make sure desired device name & OS version are suitable for the Xcode version installed on osx_image
24+
- iOS_DEVICE_NAME="iPad Pro"
25+
- iOS_RUNTIME_VERSION="9.3"
26+
# Get simulator identifier for desired device/runtime pair
27+
- SIMULATOR_ID=$(xcrun instruments -s | grep -o "${iOS_DEVICE_NAME} (${iOS_RUNTIME_VERSION}) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$/\1/")
28+
- echo $SIMULATOR_ID
29+
- echo $iOS_DEVICE_NAME
30+
- echo $iOS_RUNTIME_VERSION
31+
- xcodebuild test -scheme Algebra-iOS -destination "platform=iOS Simulator,name=${iOS_DEVICE_NAME},OS=${iOS_RUNTIME_VERSION}" | xcpretty -c
32+
- xcodebuild test -scheme Algebra-tvOS -destination 'platform=tvOS Simulator,name=Apple TV 1080p' | xcpretty -c
33+
- os: linux
34+
language: generic
35+
sudo: required
36+
dist: trusty
37+
before_install:
38+
- git submodule update --init --recursive
39+
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
40+
- wget https://swift.org/builds/swift-2.2.1-release/ubuntu1404/swift-2.2.1-RELEASE/swift-2.2.1-RELEASE-ubuntu14.04.tar.gz
41+
- tar xzf swift-2.2.1-RELEASE-ubuntu14.04.tar.gz
42+
- export PATH=${PWD}/swift-2.2.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
43+
script:
44+
# Uncomment when releasing Swift 3.0
45+
# - swift build
846
notifications:
947
webhooks:
1048
urls:
1149
- https://webhooks.gitter.im/e/1d781e1bcbabade5de35
1250
on_success: always
1351
on_failure: always
1452
on_start: always
53+

Algebra.xcodeproj/project.pbxproj

Lines changed: 476 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "570C4D95BE80B5E8C6FFC0BED8318BC62404E6A6",
3+
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
4+
5+
},
6+
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
7+
"53964F28C4CCA0826677C9F951DD3F64C20326C4" : 0,
8+
"570C4D95BE80B5E8C6FFC0BED8318BC62404E6A6" : 0,
9+
"B1566CF92CFABA5E37554B7B555A1BA50691C03A" : 0
10+
},
11+
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7463F262-5386-4D27-88FC-7EDEE3B15B7F",
12+
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
13+
"53964F28C4CCA0826677C9F951DD3F64C20326C4" : "Algebra\/Carthage\/Checkouts\/SwiftCheck\/",
14+
"570C4D95BE80B5E8C6FFC0BED8318BC62404E6A6" : "Algebra\/",
15+
"B1566CF92CFABA5E37554B7B555A1BA50691C03A" : "Algebra\/Carthage\/Checkouts\/SwiftCheck\/Carthage\/Checkouts\/Operadics\/"
16+
},
17+
"DVTSourceControlWorkspaceBlueprintNameKey" : "Algebra",
18+
"DVTSourceControlWorkspaceBlueprintVersion" : 203,
19+
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Algebra.xcodeproj",
20+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
21+
{
22+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/typelift\/SwiftCheck.git",
23+
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
24+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "53964F28C4CCA0826677C9F951DD3F64C20326C4"
25+
},
26+
{
27+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/CodaFi\/Algebra.git",
28+
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
29+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "570C4D95BE80B5E8C6FFC0BED8318BC62404E6A6"
30+
},
31+
{
32+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/typelift\/Operadics.git",
33+
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
34+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "B1566CF92CFABA5E37554B7B555A1BA50691C03A"
35+
}
36+
]
37+
}

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

Lines changed: 2 additions & 2 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 = "0730"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -22,7 +22,7 @@
2222
</BuildActionEntry>
2323
<BuildActionEntry
2424
buildForTesting = "YES"
25-
buildForRunning = "YES"
25+
buildForRunning = "NO"
2626
buildForProfiling = "NO"
2727
buildForArchiving = "NO"
2828
buildForAnalyzing = "YES">
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0800"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "822D2FC01D74BE8F007F3DF3"
18+
BuildableName = "Algebra.framework"
19+
BlueprintName = "Algebra-tvOS"
20+
ReferencedContainer = "container:Algebra.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "822D2FC81D74BE8F007F3DF3"
36+
BuildableName = "Algebra-tvOSTests.xctest"
37+
BlueprintName = "Algebra-tvOSTests"
38+
ReferencedContainer = "container:Algebra.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "822D2FC01D74BE8F007F3DF3"
46+
BuildableName = "Algebra.framework"
47+
BlueprintName = "Algebra-tvOS"
48+
ReferencedContainer = "container:Algebra.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "822D2FC01D74BE8F007F3DF3"
68+
BuildableName = "Algebra.framework"
69+
BlueprintName = "Algebra-tvOS"
70+
ReferencedContainer = "container:Algebra.xcodeproj">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
<AdditionalOptions>
74+
</AdditionalOptions>
75+
</LaunchAction>
76+
<ProfileAction
77+
buildConfiguration = "Release"
78+
shouldUseLaunchSchemeArgsEnv = "YES"
79+
savedToolIdentifier = ""
80+
useCustomWorkingDirectory = "NO"
81+
debugDocumentVersioning = "YES">
82+
<MacroExpansion>
83+
<BuildableReference
84+
BuildableIdentifier = "primary"
85+
BlueprintIdentifier = "822D2FC01D74BE8F007F3DF3"
86+
BuildableName = "Algebra.framework"
87+
BlueprintName = "Algebra-tvOS"
88+
ReferencedContainer = "container:Algebra.xcodeproj">
89+
</BuildableReference>
90+
</MacroExpansion>
91+
</ProfileAction>
92+
<AnalyzeAction
93+
buildConfiguration = "Debug">
94+
</AnalyzeAction>
95+
<ArchiveAction
96+
buildConfiguration = "Release"
97+
revealArchiveInOrganizer = "YES">
98+
</ArchiveAction>
99+
</Scheme>

Algebra.xcodeproj/xcshareddata/xcschemes/Algebra.xcscheme

Lines changed: 2 additions & 2 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 = "0730"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -22,7 +22,7 @@
2222
</BuildActionEntry>
2323
<BuildActionEntry
2424
buildForTesting = "YES"
25-
buildForRunning = "YES"
25+
buildForRunning = "NO"
2626
buildForProfiling = "NO"
2727
buildForArchiving = "NO"
2828
buildForAnalyzing = "YES">

Algebra/Algebra.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// Algebra.swift
3+
// Algebra
4+
//
5+
// Created by Robert Widmann on 6/2/15.
6+
// Copyright (c) 2015 TypeLift. All rights reserved.
7+
//
8+
9+
protocol Algebra {
10+
associatedtype R : Semiring
11+
associatedtype A
12+
}
13+
14+
protocol Coalgebra : Algebra {
15+
}
16+
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,5 @@
66
// Copyright (c) 2014 TypeLift. All rights reserved.
77
//
88

9-
infix operator <> {
10-
11-
}
12-
13-
infix operator *<> {
14-
15-
}
16-
17-
infix operator <>* {
18-
19-
}
9+
infix operator *<> { }
10+
infix operator <>* { }

0 commit comments

Comments
 (0)