Skip to content
This repository has been archived by the owner on Jan 25, 2018. It is now read-only.

added type alias Checked #47

Merged
merged 1 commit into from
Sep 19, 2017
Merged

Conversation

danbills
Copy link
Contributor

I know @geoffjentry doesn't particularly like package objects, but I think this approach is superior to creating a package and named object to hold a single type alias.

Also @cjllanwarne had requested toValid and fromValid, but those are present in cats' toValidated and toEither via cats.syntax.either._.

@geoffjentry
Copy link
Contributor

geoffjentry commented Sep 19, 2017

@danbills I don't mind them for things like this, provided they stay minimal.

edit: also, IMO this is the one thing they're good for :)

@mcovarr
Copy link
Contributor

mcovarr commented Sep 19, 2017

What is the intent with this?

@danbills
Copy link
Contributor Author

@mcovarr to put this type alias in a common place.

the intent to use Either as opposed to ErrorOr is discussed here.

@mcovarr
Copy link
Contributor

mcovarr commented Sep 19, 2017

mokay. Hopefully we can have some sugar so it's not all toLeft and toRight though. Is the applicative usage the same as before?

Copy link
Contributor

@cjllanwarne cjllanwarne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danbills
Copy link
Contributor Author

@mcovarr traverse looks almost the same. One has to call .toEither at the end of the traverse, as seen here.

@danbills
Copy link
Contributor Author

also, toValidated and toEither is sugar, no? What would you prefer?

@danbills danbills merged commit f5f7f86 into broadinstitute:develop Sep 19, 2017
@danbills danbills deleted the db_checked branch September 19, 2017 19:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants