Re: custom Format class (Was: [RFC] Support Unicode characters in instance Show String)
Hécate <[email protected]> Thu, 8 Jul 2021 23:07:36 +0200
| Newsgroups | gmane.comp.lang.haskell.libraries |
|---|---|
| Message-ID | <[email protected]> |
You can literally piggyback on Show's machinery for generic deriving? I don't understand the issue here. If the output is not easily-read by humans, then implement the instance yourself? Le 08/07/2021 à 22:01, Henning Thielemann a écrit : > > On Thu, 8 Jul 2021, Hécate wrote: > >> > I don't see a plausible path of getting most libraries that implement >> > `Show` to start implemeting a second parallel class for friendly >> display. >> >> * Extensive publicity of this typeclass in community (social media, etc) >> * Stock deriving (implemented by GHC & the CLC) > > That works for Show, because Show is expected to display Haskell code. > But how would you automatically derive human readable text from an > arbitrary algebraic data type? > >> * First-class place in documentation (Documentation Task Force of the >> HF) >> * Coordinated effort with popular libraries to implement its adoption >> (CLC + stakeholders) >> * Maybe a code-modding script using retrie. >> >> We will have to work as a community on that one but I am convinced >> that this is doable. -- Hécate ✨ 🐦: @TechnoEmpress IRC: Hecate WWW: https://glitchbra.in RUN: BSD _______________________________________________ Libraries mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries