Coercible class (Was: newtype wrappers)

Roman Cheplyaka roma at ro-che.info
Sun Sep 15 21:00:33 UTC 2013


Could you explain why you think it's a language feature? We have plenty
of "magic" stuff like unsafePerformIO, unsafeCoerce, or StableNames,
which are not documented in the manual.

Just curious.

Roman

* Richard Eisenberg <eir at cis.upenn.edu> [2013-09-15 16:48:16-0400]
> Very cool!
> 
> In the feature as pushed, is it possible to use coerce on any old newtype? If so, then it really is a language feature and probably should go into the manual, if `coerce` is exposed.
> 
> What was the end result of the discussion on abstraction? Can a library control how its types are coerced?
> 
> Richard
> 
> On Sep 13, 2013, at 6:13 PM, Joachim Breitner <mail at joachim-breitner.de> wrote:
> 
> > Hi,
> > 
> > Am Montag, den 09.09.2013, 11:26 -0500 schrieb Austin Seipp:
> >> It sounds like Simon thinks your work is good to go, so when your tree
> >> is clean, feel free to push.
> > 
> > done!
> > 
> > Given that in the final form the feature, to the user, looks like a
> > library and not a language extension, I decided to put the documentation
> > not in the users guide, but only in the haddock for coerce and
> > Coercible.
> > 
> > So far they only live in GHC.Prim. Should we expose them in GHC.Prim for
> > 7.8, or only in 7.10?
> > 
> > Greetings,
> > Joachim
> > 
> > -- 
> > Joachim “nomeata” Breitner
> >  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
> >  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
> >  Debian Developer: nomeata at debian.org
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs at haskell.org
> > http://www.haskell.org/mailman/listinfo/ghc-devs
> 
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130916/58965800/attachment.pgp>


More information about the ghc-devs mailing list