Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-27 Thread Simon Marlow
On 17/02/2012 22:51, John Meacham wrote: On Fri, Feb 17, 2012 at 2:12 PM, Simon Marlowmarlo...@gmail.com wrote: On 17/02/12 19:36, John Meacham wrote: It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-18 Thread Eugene Crosser
I don't know enough to understand if the hard troubles described by John Meacham are real, but I think that even if they are not, the current situation violates the principle of least surprise for the author of a module. Such author may be unaware of the need to take special steps to make his

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-18 Thread Brandon Allbery
On Sat, Feb 18, 2012 at 15:15, Eugene Crosser cros...@average.org wrote: I think it would be a right thing to provide the author of an external module with baseline C environment by default, compatible with the environment under which the modules bundled with the compiler where built. And on

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread Simon Marlow
On 16/02/2012 13:25, Eugene Crosser wrote: Hello Simon, thanks for your attention :) On 02/16/2012 04:25 PM, Simon Marlow wrote: I found that earlier versions of hsc2hs included HsFFI.h into the [...] As I understand, this situation means that while the ghc itself and haskell programs

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread John Meacham
It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a differently sized off_t. John On Fri, Feb 17, 2012 at 4:23 AM, Simon Marlow marlo...@gmail.com wrote: On 16/02/2012 13:25, Eugene Crosser wrote:

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread Simon Marlow
On 17/02/12 19:36, John Meacham wrote: It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a differently sized off_t. But we're talking about Haskell code here, not C code. There's no way for something to

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-17 Thread John Meacham
On Fri, Feb 17, 2012 at 2:12 PM, Simon Marlow marlo...@gmail.com wrote: On 17/02/12 19:36, John Meacham wrote: It isn't local to a file though because it changes the ABI, for instance void foo(off_t *x); it will blow up if called from a file with a differently sized off_t. But we're

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-16 Thread Simon Marlow
On 15/02/2012 12:31, Eugene Crosser wrote: Hello all, I am new here, but I want to report what I suspect may be a problem. I ran into it while using some third-party package from hackage on a 32bit Linux with ghc 7.4.1. I discovered that off_t fields in the .hsc files in the package where

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-16 Thread Eugene Crosser
Hello Simon, thanks for your attention :) On 02/16/2012 04:25 PM, Simon Marlow wrote: I found that earlier versions of hsc2hs included HsFFI.h into the [...] As I understand, this situation means that while the ghc itself and haskell programs compiled by it are largefile-capable, any third

Re: Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-16 Thread John Meacham
I have similar issues to this in jhc due to its pervasive caching of compilation results. Basically I must keep track of any potentially ABI-changing flags and ensure they are consistently passed to every compilation unit and include them in the signature hash along with the file contents. I make

Removal of #include HsFFI.h from template-hsc.h breaks largefile support on 32bit Linux

2012-02-15 Thread Eugene Crosser
Hello all, I am new here, but I want to report what I suspect may be a problem. I ran into it while using some third-party package from hackage on a 32bit Linux with ghc 7.4.1. I discovered that off_t fields in the .hsc files in the package where interpreted as 32bit words. I suspected that