
newtype T = MkT Int#
Provided T :: # (i.e. unlifted), I don’t think this would be too hard. That is, you can give a new name (via newtype) to an unlifted type like Int#, Float#, Double# etc.
Worth a wiki page and a ticket.
Simon
From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Edward Kmett
Sent: 21 December 2015 09:10
To: Ömer Sinan Ağacan
On Dec 16, 2015, at 2:06 PM, Ömer Sinan Ağacan
mailto:omeragacan@gmail.com> wrote: In any case, this is not that big deal. When I read the code I thought this should be a trivial change but apparently it's not.
No, it's not. Your example (`f :: (Int#, b) -> b`) still has an unboxed thing in a boxed tuple. Boxed tuples simply can't (currently) hold unboxed things. And changing that is far from trivial. It's not the polymorphism that's the problem -- it's the unboxed thing in a boxed tuple.
Richard
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.orgmailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devshttps://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.haskell.org%2fcgi-bin%2fmailman%2flistinfo%2fghc-devs&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7c4ba7cbf98af84227d01808d309e6931f%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=nmxCKI9q3o%2b1pw%2f8phLXRWHv3QZ1xUpyAbN5CmyUwxQ%3d