-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode 7.2.1 / Swift 2.1 #115
Conversation
@@ -1,5 +1,9 @@ | |||
// Copyright (c) 2014 Rob Rix. All rights reserved. | |||
|
|||
public struct ResultResult<T, Error : ErrorType> { | |||
public typealias t = Result<T, Error> | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this sucks. But it's necessary for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they’re good Madness Brent
case let .Success(tree, sourcePos): | ||
return .Success(tree, sourcePos) | ||
case let .Failure(right): | ||
return .Failure(Error.withReason("no alternative matched:", sourcePos)(left, right)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result
is much better here, nice 👍
@@ -1,5 +1,9 @@ | |||
// Copyright (c) 2014 Rob Rix. All rights reserved. | |||
|
|||
public struct ResultResult<T, Error : ErrorType> { | |||
public typealias t = Result<T, Error> | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
@@ -76,12 +72,12 @@ final class AlternationTests: XCTestCase { | |||
|
|||
// MARK: - Fixtures | |||
|
|||
private let alternation = %"x" <|> (%"y" --> { _, _, _, _, _ in 1 }) | |||
private let alternation = %"x" <|> %"y" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
}, | ||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "16056085-48A1-4F20-BAB0-335120B8B6C5", | ||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { | ||
"9A760A1EBAC1979D46EF016B1BE84D98E53C16FF" : "Madness\/Carthage\/Checkouts\/Prelude\/", | ||
"7FCD68358D0D5A67F26F2A5E7B31EB3EF0CB2C00" : "Madness\/", | ||
"840BFB2A2F183FC5B01E0B21BB0D3D8EF3F6803F" : "Madness\/Carthage\/Checkouts\/Assertions\/", | ||
"D5FA66743146831DA2A20C0EAE4583EF424D9041" : "Madness\/Carthage\/Checkouts\/Either\/" | ||
"D5FA66743146831DA2A20C0EAE4583EF424D9041" : "Madness\/Carthage\/Checkouts\/Either\/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these references be 🔥d now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter?
Does anything matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. This whole file should be ignored. I'll do that.
Yeah IMO this was gross anyway 👍 |
@@ -5,3 +5,4 @@ xcuserdata | |||
*.pbxuser | |||
*.xcuserdatad | |||
*.xccheckout | |||
*.xcscmblueprint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This updates the code to Swift 7.2.1 / Swift 2.1—the earliest version of Xcode that seems to run on High Sierra.
This removes https://github.com/robrix/Prelude, https://github.com/robrix/Either, and https://github.com/antitypical/Assertions, but adds https://github.com/antitypical/Result. This makes it easier to upgrade, since the dependencies don't need to be updated. But it's also in line with where I'd like Madness to go.
There's one small casualty of this: the removal of
<|>
that returns a parser ofEither<x, y>
. But that can easily be added on top of the other<|>
variant.I'll leave this open for a day in case anyone wants to review these PRs. But if no one does, I'll carry on alone. 👊