Last active
December 28, 2015 05:39
-
-
Save longliveenduro/7451382 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Implicit conversions from C[JodaDateTime] -> C[ThriftDateTime] | |
| * Use import scalaz._ and Scalaz._ to get implicit functors for Option, List etc. | |
| */ | |
| implicit def liftConversionJodaToThrift[C[_]](wrappedJoda: C[JodaDateTime]) | |
| (implicit func: Functor[C]): C[ThriftDateTime] = | |
| func.map(wrappedJoda)(datetimeToThrift) | |
| /** | |
| * Implicit conversions from C[ThriftDateTime] -> C[JodaDateTime] | |
| * Use import scalaz._ and Scalaz._ to get implicit functors for Option, List etc. | |
| */ | |
| implicit def liftConversionThriftToJoda[C[_]](wrappedThriftDateTime: C[ThriftDateTime]) | |
| (implicit func: Functor[C]): C[JodaDateTime] = | |
| func.map(wrappedThriftDateTime)(thriftToDatetime) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment