[Hs-Generics] Proposal #2875: Correct SYB's representation of Char

Neil Mitchell ndmitchell at gmail.com
Wed Dec 17 08:41:22 EST 2008


>> I agree with the idea. However, remember that this won't be fully
>> backwards compatible as anyone who performs a pattern match will now
>> get a crash. Given that, I think I'd be more in favour of renaming
>> StringRep to CharRep in one single step, otherwise you are going to
>> allow the old code to compile fine and crash at runtime. Having
>> mkStringRep be deprecated is a good idea though.
> It would still warn about the use of deprecated StringRep (and also a
> non-exaustive pattern match with -Wall).

Yes, but you'd have to have either the deprecated warning or the
non-exhaustive pattern.

> But I won't oppose to changing it
> in one go. But then mkStringRep would disappear?

No, its a function, deprecate it, but leave it present. Constructors
are different - two constructors for one purpose is an absolute pain.
Functions can come and go, and can duplicate functionality without any



More information about the Libraries mailing list