Skip to content

Swap dependency between text and binary #221

@Bodigrim

Description

@Bodigrim

In the past there were a few discussions regarding moving Text data type (and its instances, but not any other functions) into base. One sticking point was where would instance Binary Text (currently defined in text) go: it cannot be in base (because Binary is not in base) and it cannot be in text (because if Text is defined in base and Binary is defined in binary then instance Binary Text would be orphan in text). The only option would be to move it to binary, swapping from text depending on binary to vice versa.

Given that there are plans for breaking changes in binary anyway, could we use this as an opportunity to swap the order of dependencies between text and binary now (paving way to potential future move of Text into base)? Namely:

  • release binary-1.0 with an automatic Cabal flag choosing between build-depends: text >= 2.1.5 + defining instance Binary Text (by default) or no op (if forced by Cabal solver).
  • release text-2.1.5 with an automatic Cabal flag choosing between build-depends: binary < 1 + defining instance Binary Text (by default) or no op (if forced by Cabal solver).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions