ANNOUNCE: Haskell 2010 Report (final)
The Haskell 2010 report is done! I've uploaded it to www.haskell.org, and linked it from the main Haskell wiki: http://www.haskell.org/haskellwiki/Language_and_library_specification online HTML version: http://www.haskell.org/onlinereport/haskell2010 PDF: http://www.haskell.org/definition/haskell2010.pdf Thanks to everyone who commented on earlier drafts, many bugs were fixed as a result. Changes relative to the 2nd draft: - added Numeric (somehow forgotten before) - added System.IO.Error.{catch,try,ioError} - lots of rendering and typesetting bugs fixed I now formally relinquish the Haskell report editor's hat, and hand it over to the chair of the Haskell 2011 committee, Malcolm Wallace. Cheers, Simon PS. don't forget there will be a new revision of Haskell this year, and time is getting short to submit proposals. For instructions on getting involved, see http://hackage.haskell.org/trac/haskell-prime
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On 08/07/2010 22:46, John Meacham wrote:
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code.
Make a proposal to get them into Haskell 2011, I don't imagine it would be controversial. Cheers, Simon
On Fri, Jul 09, 2010 at 12:39:38PM +0100, Simon Marlow wrote:
On 08/07/2010 22:46, John Meacham wrote:
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code.
Make a proposal to get them into Haskell 2011, I don't imagine it would be controversial.
That's the thing, They were already accepted as part of H'2010. At least according to the site: http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignFunctionInterface John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On 09/07/2010 18:46, John Meacham wrote:
On Fri, Jul 09, 2010 at 12:39:38PM +0100, Simon Marlow wrote:
On 08/07/2010 22:46, John Meacham wrote:
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code.
Make a proposal to get them into Haskell 2011, I don't imagine it would be controversial.
That's the thing, They were already accepted as part of H'2010. At least according to the site:
http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignFunctionInterface
Ok, this is probably an oversight on my part, so sorry about that. I can treat it as errata and fix the report. However I'm a bit confused. Currently we have IntPtr and WordPtr exported by Foreign.Ptr in base, but we don't have IntMax and WordMax anywhere that I can see, and I don't recall any discussion about where they should be defined, or what they should be defined to. We do have CIntPtr, CIntMax, CWordPtr and CWordMax all exported by Foreign.C.Types, and they would seem to fulfill the requirements for portability with C99, except that we don't have a way to convert between CIntPtr/CWordPtr and Ptr/FunPtr. So wouldn't the right thing to do be to add those conversions? If we added IntPtr to Foreign.Ptr instead, that still doesn't let you write portable FFI bindings because there's no requirement that IntPtr is equivalent to intptr_t. Cheers, Simon
On Mon, Jul 12, 2010 at 11:57:18AM +0100, Simon Marlow wrote:
On 09/07/2010 18:46, John Meacham wrote:
On Fri, Jul 09, 2010 at 12:39:38PM +0100, Simon Marlow wrote:
On 08/07/2010 22:46, John Meacham wrote:
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code.
Make a proposal to get them into Haskell 2011, I don't imagine it would be controversial.
That's the thing, They were already accepted as part of H'2010. At least according to the site:
http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignFunctionInterface
Ok, this is probably an oversight on my part, so sorry about that. I can treat it as errata and fix the report.
However I'm a bit confused. Currently we have IntPtr and WordPtr exported by Foreign.Ptr in base, but we don't have IntMax and WordMax anywhere that I can see, and I don't recall any discussion about where they should be defined, or what they should be defined to.
Hmm... It appears there was some divergence between my initial proposal, what jhc implemented, and what ghc implemented. Is there any issue with declaring that IntPtr and WordPtr marshal to intptr_t and uintptr_t respectively? If not, then just having those in Foreign.Ptr like ghc does seems fine. In jhc I export them from Data.Word and Data.Int respectively, but I will change it to match ghc/the report. I do think IntMax and WordMax are quite useful as haskell types and should be in Data.Int and Data.Word, but if we have CIntMax and CWordMax then they arn't strictly neccesary from a FFI standpoint. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
On 12/07/2010 13:09, John Meacham wrote:
On Mon, Jul 12, 2010 at 11:57:18AM +0100, Simon Marlow wrote:
On 09/07/2010 18:46, John Meacham wrote:
On Fri, Jul 09, 2010 at 12:39:38PM +0100, Simon Marlow wrote:
On 08/07/2010 22:46, John Meacham wrote:
Ack, I just noticed that IntPtr,IntMax, and WordPtr and WordMax were left out of the report. These are fairly vital for writing portable FFI code.
Make a proposal to get them into Haskell 2011, I don't imagine it would be controversial.
That's the thing, They were already accepted as part of H'2010. At least according to the site:
http://hackage.haskell.org/trac/haskell-prime/wiki/ForeignFunctionInterface
Ok, this is probably an oversight on my part, so sorry about that. I can treat it as errata and fix the report.
However I'm a bit confused. Currently we have IntPtr and WordPtr exported by Foreign.Ptr in base, but we don't have IntMax and WordMax anywhere that I can see, and I don't recall any discussion about where they should be defined, or what they should be defined to.
Hmm... It appears there was some divergence between my initial proposal, what jhc implemented, and what ghc implemented. Is there any issue with declaring that IntPtr and WordPtr marshal to intptr_t and uintptr_t respectively? If not, then just having those in Foreign.Ptr like ghc does seems fine. In jhc I export them from Data.Word and Data.Int respectively, but I will change it to match ghc/the report.
I have added IntPtr and WordPtr to Foreign.Ptr, and added notes that they are compatible with intptr_t and uintptr_t, respectively. http://www.haskell.org/onlinereport/haskell2010/haskellch35.html#x43-3060003... Though I'm not sure this is the best solution, because we also have CIntPtr and CUIntPtr in Foreign.C.Types, which are guaranteed to be compatible with (u)intptr_t but do not have conversion operations. We might want to revisit this in the future. I also followed up with some other changes to the FFI spec that I overlooked in the Haskell 2010 merge, particularly to do with newtype marshalling in the definition of foreign type: http://www.haskell.org/onlinereport/haskell2010/haskellch8.html#x15-1560008....
I do think IntMax and WordMax are quite useful as haskell types and should be in Data.Int and Data.Word, but if we have CIntMax and CWordMax then they arn't strictly neccesary from a FFI standpoint.
I've left out IntMax and WordMax for now, as we don't even have them in GHC. The best way to proceed here is with a library proposal and then a Haskell 2010 proposal. Cheers, Simon
participants (2)
-
John Meacham -
Simon Marlow