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).
In the past there were a few discussions regarding moving
Textdata type (and its instances, but not any other functions) intobase. One sticking point was where wouldinstance Binary Text(currently defined intext) go: it cannot be inbase(becauseBinaryis not inbase) and it cannot be intext(because ifTextis defined inbaseandBinaryis defined inbinarytheninstance Binary Textwould be orphan intext). The only option would be to move it tobinary, swapping fromtextdepending onbinaryto vice versa.Given that there are plans for breaking changes in
binaryanyway, could we use this as an opportunity to swap the order of dependencies betweentextandbinarynow (paving way to potential future move ofTextintobase)? Namely:binary-1.0with an automatic Cabal flag choosing betweenbuild-depends: text >= 2.1.5+ defininginstance Binary Text(by default) or no op (if forced by Cabal solver).text-2.1.5with an automatic Cabal flag choosing betweenbuild-depends: binary < 1+ defininginstance Binary Text(by default) or no op (if forced by Cabal solver).