Skip to content
This repository has been archived by the owner on Jul 14, 2019. It is now read-only.

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Jendrusch committed Apr 21, 2015
1 parent 97e2967 commit 55d4ca7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "felixjendrusch/ValueTransformer" ~> 2.0
github "felixjendrusch/ValueTransformer" ~> 2.1
github "robb/Monocle" ~> 0.0.1
7 changes: 2 additions & 5 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
github "robrix/Box" "18d05a56845837eea90a36854c67de2520983bf8"
github "robb/Monocle" "0.0.1"
github "Quick/Nimble" "v0.4.2"
github "robrix/Prelude" "180e9ae5e60ec47abd8f3e0fa68cafbbbd160abe"
github "Quick/Quick" "v0.3.1"
github "felixjendrusch/ValueTransformer" "2.0.0"
github "felixjendrusch/Either" "b6f227c35f9de92840909e498200ad6f8b0769f6"
github "felixjendrusch/Result" "ed4f576575528e41c292ff6e31cc7fec20de4b79"
github "antitypical/Result" "0.3"
github "felixjendrusch/ValueTransformer" "2.1.0-beta.2"
24 changes: 0 additions & 24 deletions Pistachio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,15 @@
DC516CCE1ADAEDAC006112F2 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CCD1ADAEDAC006112F2 /* Result.framework */; };
DC516CCF1ADAEE00006112F2 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CCD1ADAEDAC006112F2 /* Result.framework */; };
DC516CD01ADAEE08006112F2 /* Result.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CCD1ADAEDAC006112F2 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CD81ADAEE27006112F2 /* Prelude.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CD41ADAEE27006112F2 /* Prelude.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CD91ADAEE58006112F2 /* Monocle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CD31ADAEE27006112F2 /* Monocle.framework */; };
DC516CDA1ADAEE74006112F2 /* Monocle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CD31ADAEE27006112F2 /* Monocle.framework */; };
DC516CDB1ADAEE9C006112F2 /* Box.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CD11ADAEE27006112F2 /* Box.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CDC1ADAEE9C006112F2 /* Either.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CD21ADAEE27006112F2 /* Either.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CDD1ADAEEA3006112F2 /* Monocle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CD31ADAEE27006112F2 /* Monocle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CDE1ADAEEAE006112F2 /* Quick.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC20783A1A868B00005A9CF2 /* Quick.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CDF1ADAEEAE006112F2 /* Nimble.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC2078391A868B00005A9CF2 /* Nimble.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CE51ADAEF14006112F2 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CE41ADAEED7006112F2 /* Result.framework */; };
DC516CE61ADAEF17006112F2 /* Monocle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC516CE21ADAEED7006112F2 /* Monocle.framework */; };
DC516CE71ADAEF2B006112F2 /* Quick.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCA767A71ACEAD38007E4C12 /* Quick.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CE81ADAEF2B006112F2 /* Nimble.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCA767A61ACEAD38007E4C12 /* Nimble.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CE91ADAEF2B006112F2 /* Prelude.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CE31ADAEED7006112F2 /* Prelude.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CEA1ADAEF2B006112F2 /* Box.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CE01ADAEED7006112F2 /* Box.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CEB1ADAEF2B006112F2 /* Either.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CE11ADAEED7006112F2 /* Either.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CEC1ADAEF2B006112F2 /* Result.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CE41ADAEED7006112F2 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CED1ADAEF2B006112F2 /* ValueTransformer.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DCA767BB1ACEAF35007E4C12 /* ValueTransformer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DC516CEE1ADAEF2B006112F2 /* Monocle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DC516CE21ADAEED7006112F2 /* Monocle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
Expand Down Expand Up @@ -93,9 +87,6 @@
files = (
DC516CDE1ADAEEAE006112F2 /* Quick.framework in CopyFiles */,
DC516CDF1ADAEEAE006112F2 /* Nimble.framework in CopyFiles */,
DC516CD81ADAEE27006112F2 /* Prelude.framework in CopyFiles */,
DC516CDB1ADAEE9C006112F2 /* Box.framework in CopyFiles */,
DC516CDC1ADAEE9C006112F2 /* Either.framework in CopyFiles */,
DC516CD01ADAEE08006112F2 /* Result.framework in CopyFiles */,
DCA767BE1ACEAF5A007E4C12 /* ValueTransformer.framework in CopyFiles */,
DC516CDD1ADAEEA3006112F2 /* Monocle.framework in CopyFiles */,
Expand All @@ -110,9 +101,6 @@
files = (
DC516CE71ADAEF2B006112F2 /* Quick.framework in CopyFiles */,
DC516CE81ADAEF2B006112F2 /* Nimble.framework in CopyFiles */,
DC516CE91ADAEF2B006112F2 /* Prelude.framework in CopyFiles */,
DC516CEA1ADAEF2B006112F2 /* Box.framework in CopyFiles */,
DC516CEB1ADAEF2B006112F2 /* Either.framework in CopyFiles */,
DC516CEC1ADAEF2B006112F2 /* Result.framework in CopyFiles */,
DC516CED1ADAEF2B006112F2 /* ValueTransformer.framework in CopyFiles */,
DC516CEE1ADAEF2B006112F2 /* Monocle.framework in CopyFiles */,
Expand All @@ -133,14 +121,8 @@
DC492A171A83BB59007B52D6 /* PistachioTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PistachioTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DC492A1D1A83BB59007B52D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DC516CCD1ADAEDAC006112F2 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/iOS/Result.framework; sourceTree = "<group>"; };
DC516CD11ADAEE27006112F2 /* Box.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Box.framework; path = Carthage/Build/iOS/Box.framework; sourceTree = "<group>"; };
DC516CD21ADAEE27006112F2 /* Either.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Either.framework; path = Carthage/Build/iOS/Either.framework; sourceTree = "<group>"; };
DC516CD31ADAEE27006112F2 /* Monocle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Monocle.framework; path = Carthage/Build/iOS/Monocle.framework; sourceTree = "<group>"; };
DC516CD41ADAEE27006112F2 /* Prelude.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Prelude.framework; path = Carthage/Build/iOS/Prelude.framework; sourceTree = "<group>"; };
DC516CE01ADAEED7006112F2 /* Box.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Box.framework; path = Carthage/Build/Mac/Box.framework; sourceTree = "<group>"; };
DC516CE11ADAEED7006112F2 /* Either.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Either.framework; path = Carthage/Build/Mac/Either.framework; sourceTree = "<group>"; };
DC516CE21ADAEED7006112F2 /* Monocle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Monocle.framework; path = Carthage/Build/Mac/Monocle.framework; sourceTree = "<group>"; };
DC516CE31ADAEED7006112F2 /* Prelude.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Prelude.framework; path = Carthage/Build/Mac/Prelude.framework; sourceTree = "<group>"; };
DC516CE41ADAEED7006112F2 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/Mac/Result.framework; sourceTree = "<group>"; };
DC7CEA161AE28B2F0049F077 /* LensExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LensExtensions.swift; sourceTree = "<group>"; };
DC7CEA181AE28B2F0049F077 /* NSNumberValueTransformers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSNumberValueTransformers.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -301,9 +283,6 @@
children = (
DC20783A1A868B00005A9CF2 /* Quick.framework */,
DC2078391A868B00005A9CF2 /* Nimble.framework */,
DC516CD41ADAEE27006112F2 /* Prelude.framework */,
DC516CD11ADAEE27006112F2 /* Box.framework */,
DC516CD21ADAEE27006112F2 /* Either.framework */,
DC516CCD1ADAEDAC006112F2 /* Result.framework */,
DCA767B91ACEAF17007E4C12 /* ValueTransformer.framework */,
DC516CD31ADAEE27006112F2 /* Monocle.framework */,
Expand All @@ -316,9 +295,6 @@
children = (
DCA767A71ACEAD38007E4C12 /* Quick.framework */,
DCA767A61ACEAD38007E4C12 /* Nimble.framework */,
DC516CE31ADAEED7006112F2 /* Prelude.framework */,
DC516CE01ADAEED7006112F2 /* Box.framework */,
DC516CE11ADAEED7006112F2 /* Either.framework */,
DC516CE41ADAEED7006112F2 /* Result.framework */,
DCA767BB1ACEAF35007E4C12 /* ValueTransformer.framework */,
DC516CE21ADAEED7006112F2 /* Monocle.framework */,
Expand Down
5 changes: 2 additions & 3 deletions Pistachio/Extensions/LensExtensions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright (c) 2015 Felix Jendrusch. All rights reserved.

import Prelude
import Result
import ValueTransformer
import Monocle
Expand All @@ -27,11 +26,11 @@ public func map<A, V: ReversibleValueTransformerType>(lens: Lens<A, V.ValueType>

public func map<A, V: ReversibleValueTransformerType>(lens: Lens<Result<A, V.ErrorType>, Result<V.ValueType, V.ErrorType>>, reversibleValueTransformer: V) -> Lens<Result<A, V.ErrorType>, Result<V.TransformedValueType, V.ErrorType>> {
let get: Result<A, V.ErrorType> -> Result<V.TransformedValueType, V.ErrorType> = { a in
return Monocle.get(lens, a).flatMap(curry(transform)(reversibleValueTransformer))
return Monocle.get(lens, a).flatMap(transform(reversibleValueTransformer))
}

let set: (Result<A, V.ErrorType>, Result<V.TransformedValueType, V.ErrorType>) -> Result<A, V.ErrorType> = { a, c in
return Monocle.set(lens, a, c.flatMap(curry(reverseTransform)(reversibleValueTransformer)))
return Monocle.set(lens, a, c.flatMap(reverseTransform(reversibleValueTransformer)))
}

return Lens(get: get, set: set)
Expand Down

0 comments on commit 55d4ca7

Please sign in to comment.