Visitar URL original
Semigroup instance · Issue #25 · spl/dlist · GitHub
Skip to content

Semigroup instance #25

Closed
Closed

Description

@spl

Semigroup will be in base from GHC >= 8.0 (GHC #10365). We should now probably add an instance for it, since we can do it without adding another dependency. This may also involve revisiting #11.

Activity

  1. self-assigned this
    on Feb 10, 2016
  2. spl commented on Feb 10, 2016

    @spl
    OwnerAuthor

    @gregwebs Since Semigroup is in base for GHC 8.0, I think it makes sense to have an instance for it in dlist. What would you like to do about dlist-instances? Would it make sense to put an upperbound on the base dependency for dlist-instances so that the two packages do not conflict? Alternatively, you don't have to do anything. I think users of dlist will need to add CPP anyways if they want to support dlist with dlist-instances and dlist with the Semigroup instance.

  3. gregwebs commented on Feb 12, 2016

    @gregwebs

    Seems like dlist-instances should include CPP To exclude the instance for GHC 8. That will make it possible for some users not to change anything

  4. spl commented on Feb 15, 2016

    @spl
    OwnerAuthor

    Good idea. I'll put in the change sometime in the next few weeks.

  5. hvr commented on Feb 29, 2016

    @hvr
    Contributor

    Btw, there's also the option (assuming @ekmett is ok with it) to have the semigroups package provide non-orphan DList instances for GHC<8 (semigroups already does this for a few other packages whose authors prefered to not add a dependency on semigroups)

  6. ekmett commented on Feb 29, 2016

    @ekmett

    I'm open to it. Toss me a patch.

  7. added 7 commits that reference this issue on Jul 12, 2016
    603f228
    8e0481d
    cc487d4
    3e7a9d6
    8e547d1
    0f17548
    f031b66
  8. spl commented on Jul 12, 2016

    @spl
    OwnerAuthor

    Finally got around to dealing with this.

    @gregwebs See #27 (in particular f031b66) for how I'm doing the Semigroup instance. This is going into dlist-0.8. I suppose it would make sense to use CPP with !MIN_VERSION_dlist(0,8,0) wrapping the instance.

    @ekmett Since there is already dlist-instances with an orphan instance of Semigroup for DList and people are using it, I think it can remain as the source for that instance.

  9. ekmett commented on Jun 20, 2017

    @ekmett

    @spl Given that the problem will clear up over a couple of ghc releases and fade into obscurity I can blissfully ignore the orphan issue. shrug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions