Proposal: Export Any from Unsafe.Coerce
 
            Any is the sanctioned intermediary for unsafeCoerce. GHC claims to guarantee that any lifted type can be coerced to and from Any without harm. Yet Any seems to be available only from the deeply mystical GHC.Prim, which users outside the GHC source tree are never supposed to import. While GHC.Exts would be an acceptable place, I think Unsafe.Coerce is more appropriate, and will make it easier for users to find this type.
 
            Sounds reasonable to me. Also, see #10886, which this request prompted me to make.
Richard
On Sep 14, 2015, at 1:44 PM, David Feuer 
Any is the sanctioned intermediary for unsafeCoerce. GHC claims to guarantee that any lifted type can be coerced to and from Any without harm. Yet Any seems to be available only from the deeply mystical GHC.Prim, which users outside the GHC source tree are never supposed to import. While GHC.Exts would be an acceptable place, I think Unsafe.Coerce is more appropriate, and will make it easier for users to find this type.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
 
            Sounds like a good idea to me, granted I don't use Any myself, but it and
unsafeCoerce require similar levels of care and compiler understanding afaik
On Tuesday, September 15, 2015, Richard Eisenberg 
Sounds reasonable to me. Also, see #10886, which this request prompted me to make.
Richard
On Sep 14, 2015, at 1:44 PM, David Feuer
javascript:_e(%7B%7D,'cvml','david.feuer@gmail.com');> wrote: Any is the sanctioned intermediary for unsafeCoerce. GHC claims to guarantee that any lifted type can be coerced to and from Any without harm. Yet Any seems to be available only from the deeply mystical GHC.Prim, which users outside the GHC source tree are never supposed to import. While GHC.Exts would be an acceptable place, I think Unsafe.Coerce is more appropriate, and will make it easier for users to find this type. _______________________________________________ Libraries mailing list Libraries@haskell.org javascript:_e(%7B%7D,'cvml','Libraries@haskell.org'); http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
 
            Certainly OK with me too.  GHC.Exts is the right place.
Simon
From: Libraries [mailto:libraries-bounces@haskell.org] On Behalf Of Richard Eisenberg
Sent: 15 September 2015 15:10
To: David Feuer
Cc: Haskell Libraries
Subject: Re: Proposal: Export Any from Unsafe.Coerce
Sounds reasonable to me. Also, see #10886, which this request prompted me to make.
Richard
On Sep 14, 2015, at 1:44 PM, David Feuer 
participants (4)
- 
                 Carter Schonwald Carter Schonwald
- 
                 David Feuer David Feuer
- 
                 Richard Eisenberg Richard Eisenberg
- 
                 Simon Peyton Jones Simon Peyton Jones