Skip to content
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

Conversions between Coproducts and Eithers #699

Merged
merged 3 commits into from
Mar 20, 2017

Conversation

mgzuber
Copy link
Contributor

@mgzuber mgzuber commented Mar 16, 2017

Closes #648

@mgzuber mgzuber force-pushed the topic/CoproductToEither branch from 6913754 to cb49112 Compare March 16, 2017 22:49
@codecov-io
Copy link

Codecov Report

Merging #699 into master will increase coverage by 0.06%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##           master     #699      +/-   ##
==========================================
+ Coverage   83.52%   83.58%   +0.06%     
==========================================
  Files          65       66       +1     
  Lines        2592     2608      +16     
  Branches       93       90       -3     
==========================================
+ Hits         2165     2180      +15     
- Misses        427      428       +1
Impacted Files Coverage Δ
...re/src/main/scala/shapeless/syntax/coproduct.scala 97.87% <100%> (+0.04%)
...e/src/main/scala/shapeless/syntax/std/either.scala 100% <100%> (ø)
core/src/main/scala/shapeless/ops/coproduct.scala 83.88% <92.3%> (+0.47%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a196f79...cb49112. Read the comment docs.

@milessabin
Copy link
Owner

This is great stuff ... many thanks!

Would you consider doing the equivalent for nested pairs as well?

Anyhow ... merging :-)

@milessabin milessabin merged commit fdfb097 into milessabin:master Mar 20, 2017
@mgzuber
Copy link
Contributor Author

mgzuber commented Mar 20, 2017

@milessabin you mean something along the lines of:

val t = (1, ("abc", (false, 2.0)))
val h = t.toHList
typed[Int :: String :: Boolean :: Double :: HNil](h)

?

@milessabin
Copy link
Owner

Exactly so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants