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

Added GenericShowFields instances for NoConstructors and NoArguments#20

Merged
paf31 merged 5 commits into
purescript-deprecated:masterfrom
kejace:master
Dec 4, 2017
Merged

Added GenericShowFields instances for NoConstructors and NoArguments#20
paf31 merged 5 commits into
purescript-deprecated:masterfrom
kejace:master

Conversation

@kejace

@kejace kejace commented Dec 2, 2017

Copy link
Copy Markdown
Contributor

We needed these in order to support

derive instance genericA :: G.Generic A _

instance showGenericA :: Show A where
  show = G.genericShow

I'm not sure ["{}"] is the right thing to return here though, so I'm open to suggestions.

@paf31

paf31 commented Dec 3, 2017

Copy link
Copy Markdown
Contributor

I understand why NoArguments is needed, but not NoConstructors. Also, {} is already rendered above where genericShowFields is called, so really you should only need an empty array.

@kejace

kejace commented Dec 4, 2017

Copy link
Copy Markdown
Contributor Author

Agreed. I changed the PR accordingly.

@paf31 paf31 merged commit f7ec49d into purescript-deprecated:master Dec 4, 2017
@paf31

paf31 commented Dec 4, 2017

Copy link
Copy Markdown
Contributor

Thanks!

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.

2 participants