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

Remove dependency on data-default-instances-base, and bump base version #25

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

Xitian9
Copy link
Collaborator

@Xitian9 Xitian9 commented Sep 27, 2021

data-default-instances-base is not on stackage, and this is a blocker for getting this project on stackage (see #12).

However, in 2016 data-default-instances-base was made a no-op which just re-exports instances from data-default-class, which we already depend on. It can therefore be safely removed.

@Xitian9
Copy link
Collaborator Author

Xitian9 commented Sep 27, 2021

An as aside, current sentiment seems to be moving against the usage of Default in code. It might be worth reducing reliance on it in general, replacing/supplementing things like instance Default a where def = … with things like:

defA :: a
defA = …

-- Optional
instance Default a where def = defA

@Xitian9 Xitian9 changed the title Remove dependency on data-default-instances-base Remove dependency on data-default-instances-base, and bump base version Sep 27, 2021
Since data-default-class-1.2.0 (released in 2016),
data-default-instances-base just re-exports instances from
data-default-class, and so is redundant.
@muesli4
Copy link
Owner

muesli4 commented Sep 27, 2021

Nice.

An as aside, current sentiment seems to be moving against the usage of Default in code.

I wasn't happy with it either. The way they enable putting together options in optparse-applicative is really one of my favorites. But let us discuss that in the related thread.

@muesli4 muesli4 merged commit 7396983 into muesli4:master Sep 27, 2021
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.

2 participants