
23 Sep
2017
23 Sep
'17
9:28 p.m.
On Fri, 22 Sep 2017, Evan Laforge wrote:
However, a lot of those I think would be false positives, because they're converting across newtypes, where the underlying type is the same. I'm not sure what I would use for those... I guess it would be fromIntegerWrapped, but it's kind of verbose and awkward and is implying wrapping when it's not actually present. Maybe they should be using 'coerce'?
Why not just use the newtype constructor or field accessor for packing and unpacking? Usually I wrap Ints in newtypes for identifiers. Identifiers should not support Num arithmetic and thus would not allow fromIntegral anyway.