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

[generics-rep] newtype NoConstructors = NoConstructors Void #247

Closed
rightfold opened this issue Jun 5, 2017 · 8 comments · Fixed by #282
Closed

[generics-rep] newtype NoConstructors = NoConstructors Void #247

rightfold opened this issue Jun 5, 2017 · 8 comments · Fixed by #282
Labels
purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump.

Comments

@rightfold
Copy link
Contributor

This way you can use absurd. Although if we implement purescript/purescript#2922 then this is not necessary.

@paf31
Copy link
Contributor

paf31 commented Jun 5, 2017

👍 Sounds good, although it's (technically) breaking unfortunately.

@hdgarrood
Copy link
Contributor

Another possibility could be to just provide a separate absurd :: forall a. NoConstructors -> a?

@JordanMartinez
Copy link
Contributor

Is this a breaking change we want to get in before v0.14.0?

@hdgarrood
Copy link
Contributor

I’m not sure this is even breaking actually: right now we don’t export any constructors so I can’t think of how code might stop working if we did this. It would be breaking if we had done purescript/purescript#2922, but we haven’t yet.

@JordanMartinez JordanMartinez changed the title newtype NoConstructors = NoConstructors Void [generics-rep] newtype NoConstructors = NoConstructors Void Dec 26, 2020
@JordanMartinez JordanMartinez transferred this issue from purescript-deprecated/purescript-generics-rep Dec 26, 2020
@JordanMartinez
Copy link
Contributor

I'm going to close this for the time being. I don't think this is relevant until the above issue is implemented (if we do decide to do that).

@hdgarrood
Copy link
Contributor

I think it is still relevant, because regardless of what we do in the linked issue, we should provide a way of eliminating a NoConstructors value so that users don’t need to resort to unsafe functions. It does depend on the result of that issue but if we don’t do anything there then we will need to do something here.

@hdgarrood hdgarrood reopened this Dec 26, 2020
@hdgarrood
Copy link
Contributor

(It’s not vital to address this before 0.14 but that doesn’t mean it can’t stay open.)

@JordanMartinez
Copy link
Contributor

Makes sense. I feel like this should have a label on it indicating that it depends on the compiler so that one doesn't have to read the whole thing to understand that and so we can filter it out of searches.

@JordanMartinez JordanMartinez added purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump. labels Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
purs-0.15 A reminder to address this issue or merge this PR before we release PureScript v0.15.0 type: breaking change A change that requires a major version bump.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants