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

Port generics-rep to prelude #235

Merged
merged 43 commits into from
Dec 24, 2020
Merged

Port generics-rep to prelude #235

merged 43 commits into from
Dec 24, 2020

Conversation

JordanMartinez
Copy link
Contributor

No description provided.

paf31 and others added 28 commits October 1, 2016 12:53
* Initial work on deriving Show

* Add test for Show

* Remove import

* Travis etc.
* Data.Generic.Rep.Bounded

Generic implementations of Prelude.Bounded class's top and bottom.

* GenericBounded - don't support product types

* GenericBounded - only support NoArguments
Update for PureScript 0.11
Add classes for Enum deriving
Product instances in Bounded and Enum
…20)

* Added Eq and Show instances to NoArguments and NoConstructors

* Added GenericShowFields

* Removed Show, Eq

* Cleanup

* Removed NoConstructors Show instance
@JordanMartinez
Copy link
Contributor Author

I'm not sure whether all the data types defined in the Test.GenericsRep are needed anymore since the Enum-related things aren't included here.

@JordanMartinez
Copy link
Contributor Author

Pushed the migration-preparation branch to my own fork of generics-rep: https://github.com/JordanMartinez/purescript-generics-rep/tree/prepareForPreludePort

I'll now run the command and push the resulting branch here.

@JordanMartinez
Copy link
Contributor Author

CI builds and the git history from generics-rep is now included in this PR.

Copy link
Member

@kl0tl kl0tl left a comment

Choose a reason for hiding this comment

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

It’s somewhat unfortunate that generics-rep test suite will first appear in the history as test/Main.purs before being moved to test/Data/Generic/Rep.purs. I’m not sure this is worth fixing though, and thankfully it doesn’t conflict with the prelude test suite which was in test/Test/Main.purs from the start 😌 Thank you!

@JordanMartinez
Copy link
Contributor Author

It’s somewhat unfortunate that generics-rep test suite will first appear in the history as test/Main.purs before being moved to test/Data/Generic/Rep.purs. I’m not sure this is worth fixing though, and thankfully it doesn’t conflict with the prelude test suite which was in test/Test/Main.purs from the start

I don't think it's worth fixing. I'm going to merge this.

@JordanMartinez JordanMartinez merged commit b8e3453 into purescript:master Dec 24, 2020
@JordanMartinez JordanMartinez deleted the portGenericRep branch December 24, 2020 17:34
@JordanMartinez
Copy link
Contributor Author

So, looks like I accidentally renamed the class GenericRep to Generic. That's why the Maybe PR isn't building. I'll submit another PR that fixes this. Sorry about that.

@JordanMartinez
Copy link
Contributor Author

Hm... nevermind. Generic is the correct name.

turlando pushed a commit to purescm/purescript-prelude that referenced this pull request Sep 3, 2021
* first commit

* Fix instances for record fields

* Break modules up

* Deriving Show (#5)

* Initial work on deriving Show

* Add test for Show

* Remove import

* Travis etc.

* Data.Generic.Rep.Bounded (#6)

* Data.Generic.Rep.Bounded

Generic implementations of Prelude.Bounded class's top and bottom.

* GenericBounded - don't support product types

* GenericBounded - only support NoArguments

* Update for PureScript 0.11

* Add Generic instance for Maybe (purescript#9)

* Add missing Bounded instances for Argument

* Add GenericEnum and GenericBoundedEnum

* Add enum tests, convert existing "tests" into assertions

* Product instances in Bounded and Enum

* Added GenericShowFields instances for NoConstructors and NoArguments (purescript#20)

* Added Eq and Show instances to NoArguments and NoConstructors

* Added GenericShowFields

* Removed Show, Eq

* Cleanup

* Removed NoConstructors Show instance

* Remove Rec and Field & update package & bower symbols

* Bump deps for compiler/0.12

* Remove symbols and fix operator fixity issue

* Update dependencies, license

* Added HeytingAlgebra, Semiring, Ring

* Fix type annotation precedence in tests

* Replace monomorphic proxies by Type.Proxy.Proxy (purescript#44)

* Remove Generic Maybe instance

* Remove Generic Enum from src and test

* Move all files to their correct folders and rename files to Generic.purs

* Update module names to match their file names

* Move test file for Data.Generic.Rep into proper folder and rename

* Update generic-rep test file module to match file path

* Rename generic-rep test name to testGenericRep

* Replace generic Show's  Foldable.intercalate usage with FFI

* Replace Tuple with Pair in Data.Generic.Rep tests

* Remove Maybe import from Data.Generic.Rep test file

* Remove Maybe import from Data.Generic.Rep

* Extract AlmostEff and assert to Test.Utils.purs file

* Update Data.Generic.Rep tests to use AlmostEff; include it in main tests

* Import implies in Data.Generic.Rep tests

Co-authored-by: Phil Freeman <paf31@cantab.net>
Co-authored-by: Matthew Leon <ml@matthewleon.com>
Co-authored-by: Gary Burgess <gary.burgess@gmail.com>
Co-authored-by: Liam Goodacre <goodacre.liam@gmail.com>
Co-authored-by: Jorge Acereda <jacereda@gmail.com>
Co-authored-by: Kristoffer Josefsson <kejace@gmail.com>
Co-authored-by: Denis Stoyanov <stoyanov.gr@gmail.com>
Co-authored-by: Harry Garrood <harry@garrood.me>
Co-authored-by: Cyril <sobierajewicz.cyril@gmail.com>
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.

10 participants