custom Format class (Was: [RFC] Support Unicode characters in instance Show String)

Hécate hecate at glitchbra.in
Thu Jul 8 21:07:36 UTC 2021


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



More information about the Libraries mailing list