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 Lift (), Ratio a, Identity a and Const a #39

Merged
merged 5 commits into from
Apr 26, 2019

Conversation

phadej
Copy link
Contributor

@phadej phadej commented Feb 4, 2019

This is a fix of a mess I started. The idea is to separate
the three packages responsibilities:

  • th-lift provides TemplateHaskell based deriving code for Lift
    instances (and defines Lift Name)
  • th-orphans provides rest of Lift instances for
    Language.Haskell.TH namespace
  • th-lift-instances provides instances for small set of core packages,
    and acts as a compat module (e.g. provides Lift ()).

Note: th-lift-instances uses TemplateHaskellQuotes only nowadays.
(Which s sometimes handy, e.g. when splicing TemplateHaskell is broken...)
That's why I removed th-lift dependency, and didn't notice the
overlapping orphan instances problem in the first place.

This patch also simplifies the build-depends as base lower-bound
is restricted by th-abstractions anyway (dead code removed from the
library too). The th-abstraction upper bound is added,
because Ryan promised to break every consumer, as type of datatypeVars
will change.


cc @RyanGlScott


If we can make this change, and then update also descriptions of th-orphans and th-lift-instances to cross-link the packages, people will know where to look for things.

I'll make a PR to add Identity, Const with (using transformers Identity when it's not in base) to th-lift-instances.

This is unfortunate situation of shuffling orphans around, but the end result should be a lot cleared. I'll (as Hackage Trustee) help to sort out diamond breakages (as th-lift and th-lift-instances don't depend on each other) if/when they occur.

This is a fix of a mess I started. The idea is to separate
the three packages responsibilities:
- `th-lift` provides `TemplateHaskell` based deriving code for `Lift`
  instances (and defines `Lift Name`)
- `th-orphans` provides rest of `Lift` instances for
  `Language.Haskell.TH` namespace
- `th-lift-instances` provides instances for small set of core packages,
  and acts as a compat module (e.g. provides `Lift ()`).

Note: `th-lift-instances` uses `TemplateHaskellQuotes` only nowadays.
(Which s sometimes handy, e.g. when splicing TemplateHaskell is broken...)
That's why I removed `th-lift` dependency, and didn't notice the
overlapping orphan instances problem in the first place.
@phadej
Copy link
Contributor Author

phadej commented Feb 4, 2019

I made the library to only use TemplateHaskellQuotes when those are enough, so th-lift-instances could depend on th-lift. Then we'll avoid downstream dependency problems.

This is a fix of a mess I started. The idea is to separate
the three packages responsibilities:
- `th-lift` provides `TemplateHaskell` based deriving code for `Lift`
  instances (and defines `Lift Name`)
- `th-orphans` provides rest of `Lift` instances for
  `Language.Haskell.TH` namespace
- `th-lift-instances` provides instances for small set of core packages,
  and acts as a compat module (e.g. provides `Lift ()`).

Note: `th-lift-instances` uses `TemplateHaskellQuotes` only nowadays.
(Which s sometimes handy, e.g. when splicing TemplateHaskell is broken...)
That's why I removed `th-lift` dependency, and didn't notice the
overlapping orphan instances problem in the first place.

This patch also simplifies the `build-depends` as `base` lower-bound
is restricted by `th-abstractions` anyway (dead code removed from the
library too). The `th-abstraction` upper bound is added,
because Ryan promised to break every consumer, as type of `datatypeVars`
will change.
@phadej
Copy link
Contributor Author

phadej commented Feb 11, 2019

ping @mboes

1 similar comment
@phadej
Copy link
Contributor Author

phadej commented Feb 19, 2019

ping @mboes

@phadej phadej mentioned this pull request Apr 26, 2019
@mboes mboes merged commit 39ae26a into RyanGlScott:master Apr 26, 2019
@phadej phadej deleted the remove-instances branch May 6, 2019 10:09
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