unsafeCoerce and type aliases under type applications

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Dec 4 03:07:54 CET 2011

On Sat, Dec 3, 2011 at 5:39 PM, Joachim Breitner
<mail at joachim-breitner.de> wrote:
> have used unsafeCoerce to change the type inside a container to a "type"
> alias in real code, but your post makes me wonder: Under what
> circumstances is that safe? Is that documented somehow? Can a tool or
> the compiler decide for us whether it is safe?

AFAIK, newtypes are safe, and for everything else you're on your own.  =)



More information about the Libraries mailing list