Re: Standarize GHC.Prim.Any

2009-09-05 Thread Isaac Dupree
Maciej Piechotka wrote: On Thu, 2009-08-20 at 19:59 +0200, Maciej Piechotka wrote: Sorry for delay in responding. Any from GHC.Prim makes unsafeCoerce much useful and safe. Can it be included in Unsafe.Coerce module? Pros: - unsafeCoerce is much more useful with Any (it's a safe placeholder f

Allowing safe cast by default

2009-09-05 Thread Maciej Piechotka
As far as I underspend all checks of Data.Typeable.cast can be done by compiler in compile-time. While it impose partially what one may consider syntax sugar I believe that there is no restriction that would not allowed compiler to behave like that: cast :: forall a b. a -> Maybe b -- Pseudo-has

Re: Standarize GHC.Prim.Any

2009-09-05 Thread Maciej Piechotka
On Thu, 2009-08-20 at 19:59 +0200, Maciej Piechotka wrote: > Sorry for delay in responding. > > > > Any from GHC.Prim makes unsafeCoerce much useful and safe. Can it be > > > included in Unsafe.Coerce module? > > > > > > Pros: > > > - unsafeCoerce is much more useful with Any (it's a safe placeho