Re: ANN: ghc 6.8.2 from MacPorts

2008-03-05 Thread Jinwoo Lee
Thank you! But ghc has disappeared from MacPorts SW list. Only ghc-devel can be seen. Please look into it. jinwoo On Tue, Mar 4, 2008 at 11:13 PM, Gregory Wright [EMAIL PROTECTED] wrote: After what many would consider an unconscionable delay, I am happy to announce that ghc 6.8.2 is

Re: ANN: ghc 6.8.2 from MacPorts

2008-03-05 Thread Gregory Wright
On Mar 5, 2008, at 4:21 AM, Jinwoo Lee wrote: Thank you! But ghc has disappeared from MacPorts SW list. Only ghc-devel can be seen. Please look into it. ghc vanished from the distribution server for a few hours yesterday because of a unanticipated corner case in the indexing script. (The

scope of header files

2008-03-05 Thread Duncan Coutts
I was under the impression that with ghc, ffi import declarations like this do not escape the module: foreign import ccall unsafe foo.h foo foo :: IO () However it seems that this one does: foreign import ccall unsafe curses.h stdscr stdscrp :: Ptr WINDOWptr from:

Re: STM and fairness

2008-03-05 Thread Josef Svenningsson
Tim, Simon, Thanks for your detailed descriptions. Much of my understanding was confirmed. I'll see if I can send you a patch with my suggested fix as soon as my teaching is over. Thanks, Josef On Mon, Mar 3, 2008 at 2:03 PM, Tim Harris (RESEARCH) [EMAIL PROTECTED] wrote: Hi, At the moment

Re: scope of header files

2008-03-05 Thread Ross Paterson
On Wed, Mar 05, 2008 at 11:16:14PM +, Duncan Coutts wrote: I was under the impression that with ghc, ffi import declarations like this do not escape the module: foreign import ccall unsafe foo.h foo foo :: IO () GHC can inline the stub across module (and thus package) boundaries, so the

Re: scope of header files

2008-03-05 Thread Duncan Coutts
On Wed, 2008-03-05 at 23:46 +, Ross Paterson wrote: On Wed, Mar 05, 2008 at 11:16:14PM +, Duncan Coutts wrote: I was under the impression that with ghc, ffi import declarations like this do not escape the module: foreign import ccall unsafe foo.h foo foo :: IO () GHC can

Re: scope of header files

2008-03-05 Thread Ross Paterson
On Thu, Mar 06, 2008 at 12:23:35AM +, Duncan Coutts wrote: However for ghc: foreign import ccall unsafe foo.h foo foo :: IO () does not escape because ghc does not track which .h file should be #included later. It's not that it couldn't escape according to the FFI spec but that ghc

Re: scope of header files

2008-03-05 Thread John Meacham
On Thu, Mar 06, 2008 at 12:23:35AM +, Duncan Coutts wrote: Which is really annoying :-) I'd like greater control over it, in particular a way to limit headers to package scope so that dependent code does not need the headers. Ideally there would be no need for headers at all. Everything

Re: scope of header files

2008-03-05 Thread Duncan Coutts
On Wed, 2008-03-05 at 17:37 -0800, John Meacham wrote: On Thu, Mar 06, 2008 at 12:23:35AM +, Duncan Coutts wrote: Which is really annoying :-) I'd like greater control over it, in particular a way to limit headers to package scope so that dependent code does not need the headers.

Re: scope of header files

2008-03-05 Thread Ian Lynagh
On Thu, Mar 06, 2008 at 02:18:08AM +, Duncan Coutts wrote: foreign import ccall unsafe curses.h ACS_UARROW acs_uarrow :: Ptr ChType #define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */ You ought to use a C wrapper around these sorts of things. If you're lucky, the API

Re: scope of header files

2008-03-05 Thread John Meacham
On Thu, Mar 06, 2008 at 02:18:08AM +, Duncan Coutts wrote: There are rather too many of these C libs that define their public interfaces as macros. I had to adjust the zlib binding the other day to allow it to compile without -fvia-C. It now implements a couple macros in the Haskell code.

Re: scope of header files

2008-03-05 Thread John Meacham
On Thu, Mar 06, 2008 at 02:39:35AM +, Ian Lynagh wrote: I can't remember if it's been discussed before, but I think it might be a good idea for the FFI to be able to create these C stubs itself, if you give a certain keyword - or perhaps even by default as it's the safe thing to do, at the

Re: ANN: ghc 6.8.2 from MacPorts

2008-03-05 Thread Wilson MacGyver
Gregory Wright wrote: After what many would consider an unconscionable delay, I am happy to announce that ghc 6.8.2 is available from MacPorts. thank you for all the hard work, port installing now as we speak. Good job. Mac ___

monomorphic or not?

2008-03-05 Thread John Meacham
http://www.cse.unsw.edu.au/~dons/code/nobench/real/compress/compress.hs if you notice this program has the line compress = map toEnum . codes_to_ascii . encode It seems to me this should run afoul of the monomorphism restriction due to the unknown ambiguous type in Enum, but ghc 6.8.2 happily