For those not on the cvs mailing list: I've applied all the changes discussed over the last 2 moniths that received some support and no dissent. Changes since RC5: * Author list: changed Alastair Reid's institution * 4.1.1: Removed [lib] from impent syntax and discussion * 4.1.3: Added parentheses round FunPtr ft to make it easier to understand a tolerably complex type. * 4.1.4: Removed all mention of library objects * 6: Specified that HsBool==int in table2 Relabelled column 1 in table 3 (C symbol -> CPP symbol) Replaced 0 and 1 with HS_BOOL_FALSE/TRUE You will need this file: http://www.cse.unsw.edu.au/~chak/haskell/grammar.sty to build it. (I came close to adding this file to the repo but figured that Manuel must have a reason for not having done so himself.) Changes not applied: - I really, really want to resolve the ForeignPtr issues soon. http://www.mail-archive.com/ffi@haskell.org/msg00655.html http://www.mail-archive.com/ffi@haskell.org/msg00544.html http://www.mail-archive.com/ffi@haskell.org/msg00545.html - I'd like to see a standard way to call the GC from C http://www.mail-archive.com/ffi@haskell.org/msg00565.html Note that Hugs and GHC have had this for ages except that we call the function 'performGC' and there's no way to control how many generations are collected. - I see the question of Function prototypes as a portability problem waiting to happen. Either Hugs and GHC are right (you should use the user-supplied header file or NHC is right (you should ignore the header file). They can't both be right if we want portable code so the report should be clear about which one is right. (Given my druthers, I'd drop header files from the foreign import syntax and say that you have to specify it on the command line or propose that we standardize some variant of the GHCism {-# -include "foo.h" #-}. But I'm not excited enough about it to push hard for this.) - Changes to hs_init http://www.mail-archive.com/ffi@haskell.org/msg00539.html -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
Alastair Reid <alastair@reid-consulting-uk.ltd.uk> wrote,
For those not on the cvs mailing list:
I've applied all the changes discussed over the last 2 moniths that received some support and no dissent.
Changes since RC5: * Author list: changed Alastair Reid's institution * 4.1.1: Removed [lib] from impent syntax and discussion [..] * 4.1.4: Removed all mention of library objects
Is SimonPJ ok with that? We added [lib] for him (and .NET).
You will need this file:
http://www.cse.unsw.edu.au/~chak/haskell/grammar.sty
to build it. (I came close to adding this file to the repo but figured that Manuel must have a reason for not having done so himself.)
I wanted to change some stuff first and not track it in two CVS repos.
- I'd like to see a standard way to call the GC from C
http://www.mail-archive.com/ffi@haskell.org/msg00565.html
Note that Hugs and GHC have had this for ages except that we call the function 'performGC' and there's no way to control how many generations are collected.
I don't have a strong opinion on this one.
- I see the question of Function prototypes as a portability problem waiting to happen. Either Hugs and GHC are right (you should use the user-supplied header file or NHC is right (you should ignore the header file). They can't both be right if we want portable code so the report should be clear about which one is right.
(Given my druthers, I'd drop header files from the foreign import syntax and say that you have to specify it on the command line or propose that we standardize some variant of the GHCism {-# -include "foo.h" #-}. But I'm not excited enough about it to push hard for this.)
I am still in favour of user-supplied header files and the mechanism as it is defined in the spec right now.
- Changes to hs_init
I am ok with that. Currently, there is a problem with the version that is in the spec and GHC in that GHC requires an extra argument to initialise modules. So, it all depends a bit on how far SimonM thinks its implementable. Cheers, Manuel PS: Sorry for my prolonged procrastination over these issues and thanks for picking them up.
- I'd like to see a standard way to call the GC from C
http://www.mail-archive.com/ffi@haskell.org/msg00565.html
Note that Hugs and GHC have had this for ages except that we call the function 'performGC' and there's no way to control how many generations are collected.
I don't have a strong opinion on this one.
Maybe SimonM and Malcolm do. I know GHC has an interface already and I suspect that NHC will too. GHC and Hugs both call it performGC but this doesn't match the naming convention used in the ffi and it is expensive to use with generational GC (since there is no way to indicate that a partial GC may be enough).
- I see the question of Function prototypes as a portability problem waiting to happen. Either Hugs and GHC are right (you should use the user-supplied header file or NHC is right (you should ignore the header file). They can't both be right if we want portable code so the report should be clear about which one is right.
(Given my druthers, I'd drop header files from the foreign import syntax and say that you have to specify it on the command line or propose that we standardize some variant of the GHCism {-# -include "foo.h" #-}. But I'm not excited enough about it to push hard for this.)
I am still in favour of user-supplied header files and the mechanism as it is defined in the spec right now.
Malcolm and I both found it possible to interpret the spec as meaning that the header files could be ignored. If that isn't what the report means, the wording should be strengthened. [My concern with specifying header files in foreign imports is twofold: 1) It suggests the existence of multiple namespaces when I very much doubt that anyone would every implement that. 2) It is awfully repetitive because you have to mention the header files on every foreign import just in case anyone ever did implement multiple namespaces. (Other side of the same problem.) I'm not arguing for a change here - just saying that I wouldn't argue against one.]
- Changes to hs_init
I am ok with that. Currently, there is a problem with the version that is in the spec and GHC in that GHC requires an extra argument to initialise modules. So, it all depends a bit on how far SimonM thinks its implementable.
Hugs doesn't have anything resembling hs_init at the moment so I can't say for sure. I think it can be done as a thin layer on top of the the existing spec though so I don't think it's that hard. -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
participants (2)
-
Alastair Reid -
Manuel M T Chakravarty