[Proposal] Renaming (:=:) to (==)

Gábor Lehel illissius at gmail.com
Sun Sep 29 20:59:32 UTC 2013


On Sun, Sep 29, 2013 at 10:33 PM, Simon Peyton-Jones
<simonpj at microsoft.com>wrote:

> As Edward says, there is representational equality too, and we want both a
> constraint and a data type for it.  Currently the constraint looks like
>         Coercible a b
> but and the data type is currently called EqR.  Linking them more tightly
> could be a Good Thing. For example, we could hav
>         a ~~ b
> for the constraint and
>         a :~~: b
> for the data type.  I do not have strongly feelings; just pointing out the
> correspondences.
>
> Simon
>

I think `Coercible` and `coerce` (along with `unsafeCoerce`) are perfect as
they are. Not everything has to be an operator. Things with names are
self-documenting, which is good. For something that's going to show up very
frequently, it makes sense to use an operator, because (a) by showing up
very frequently, it becomes common knowledge, and (b) it's shorter. I think
this is true for (~). If something shows up only occasionally, I think it
makes more sense to use a name, because (a) widespread familiarity can't be
assumed, and (b) brevity is less important. I think this is true for
`Coercible`.

Of course, this doesn't answer the question of what to call the data type.
:-) I don't have any great ideas. (Coerce? CanCoerce? IsCoercible?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130929/a26bf190/attachment.html>


More information about the Libraries mailing list