Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Add and derive Deep class #7

Closed
wants to merge 1 commit into from
Closed

Add and derive Deep class #7

wants to merge 1 commit into from

Conversation

paf31
Copy link
Contributor

@paf31 paf31 commented Feb 26, 2017

The idea here is to obviate the need for the old generics implementation and deriving.

This is still a work in progress, but it works for everything except records. I think if we want to go this route, then we should

  • combine the two libraries back into purescript-generics
  • deprecate this one
  • make a major release of generics
  • remove old generic deriving from the compiler.

Thoughts?

@matthewleon
Copy link
Contributor

Question: Are there uses for Deep other than compatibility with non-GHC style generics? In other words, if I am writing a new library, is it an option I should look at?

@paf31
Copy link
Contributor Author

paf31 commented Feb 26, 2017

@matthewleon That is the main use case, and I'm not sure if it's worth it to be honest. I don't think there is anything you can do with generics that you can't do with generics-rep (this PR is sort of a proof of that 😄)

@paf31
Copy link
Contributor Author

paf31 commented Feb 26, 2017

I actually do have one use case which would work with old-style generics, but not with new-style generics, which is to reflect a generic signature as an actual type with a Generic instance.

So this PR is a proof that every type with a generics-rep instance also has an old Generic instance, but not the other way round, and when we're creating types at runtime, that's what we care about.

@JordanMartinez
Copy link
Contributor

Should this PR be closed?

@hdgarrood
Copy link
Contributor

I think this hasn’t had enough interest to justify inclusion in core, yeah.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants