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

Data.Generic.Rep.Bounded #6

Merged
merged 3 commits into from
Jan 11, 2017

Conversation

matthewleon
Copy link
Contributor

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

Generic implementations of Prelude.Bounded class's top and bottom.
instance genericBottomConstructor :: GenericBottom a => GenericBottom (Constructor name a) where
genericBottom' = Constructor genericBottom'

instance genericBottomProduct :: (GenericBottom a, GenericBottom b) => GenericBottom (Product a b) where
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to support Bounded for product types? I think I would rather just support NoArguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no personal objections to going the more conservative route. It's certainly more consistent with the GHC behavior. Should I modify the PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please. Let's keep things simple for now, and then when we add Enum deriving we'll have fewer questions 😄

@matthewleon
Copy link
Contributor Author

@paf31 I've updated the branch to only support and test sum types with argument-free constructors.

@paf31 paf31 merged commit 6e43a67 into purescript-deprecated:master Jan 11, 2017
@paf31
Copy link
Contributor

paf31 commented Jan 11, 2017

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