Skip to content

Conversation

@JordanMartinez
Copy link
Contributor

Fixes #47

@JordanMartinez
Copy link
Contributor Author

Had to force push this because I didn't implement fromRight correctly due to putting the Right b pattern match after the left's _ pattern match

@garyb garyb added the type: breaking change A change that requires a major version bump. label Feb 17, 2019
@hdgarrood
Copy link
Contributor

I don't think it will be totally clear what the "default value" is when these documentation comments are rendered on Pursuit and the definition isn't visible. How about this instead?

A function that extracts the value from the Left data constructor. The first argument is a default value, which will be returned in the case where a Right is passed to fromLeft.

@JordanMartinez
Copy link
Contributor Author

Yeah, that reads better. I've updated the docs to include that.

@JordanMartinez
Copy link
Contributor Author

what if we leave old partial functions, but rename them to unsafeFromLeft and unsafeFromRight?

I think keeping them makes sense.

@garyb
Copy link
Member

garyb commented May 9, 2020

I dunno, you can just do fromLeft crash with this version 🙂

@JordanMartinez JordanMartinez merged commit 9090158 into purescript:master Oct 15, 2020
@JordanMartinez JordanMartinez deleted the updateFromLR branch October 15, 2020 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: breaking change A change that requires a major version bump.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fromLeft / fromRight shouldn't be partial

3 participants