Re: [Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-13 Thread John Meacham
On Wed, Jul 12, 2006 at 04:08:02PM +0400, Bulat Ziganshin wrote: > I believe that it the simplest way for programmer. But is that the > best way for users? i want to make building/installation as simple as > possible using Cabal infrastructure. is it possible that some box will > have Cabal, but no

Re: Re[2]: [Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-12 Thread Neil Mitchell
Hi I would *guess* that hsc2hs is always distributed with ghc. I know it is on Linux and BSD -- I am not sure about Windows. It is. If you want to support hugs as well, then they would need hschs-hugs installed. Debian includes that with hugs by default -- not sure about anyone else. Windows

Re: Re[2]: [Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-12 Thread Jeremy Shaw
At Wed, 12 Jul 2006 16:08:02 +0400, Bulat Ziganshin wrote: > I believe that it the simplest way for programmer. But is that the > best way for users? i want to make building/installation as simple as > possible using Cabal infrastructure. is it possible that some box will > have Cabal, but not hsc

Re[2]: [Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-12 Thread Bulat Ziganshin
Hello Jeremy, Tuesday, July 11, 2006, 10:47:09 PM, you wrote: >> what is a best way to bring C constant (defined in header file) into >> the Haskell source? > If this ^^^ was your entire question, I would say, use hsc2hs. > http://haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html >

Re: [Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-11 Thread Jeremy Shaw
At Tue, 11 Jul 2006 19:28:13 +0400, Bulat Ziganshin wrote: > > Hello Haskell, > > what is a best way to bring C constant (defined in header file) into > the Haskell source? If this ^^^ was your entire question, I would say, use hsc2hs. http://haskell.org/ghc/docs/latest/html/users_guide/hs

[Haskell-cafe] Using of C constants in Haskell sources; Determining compilation environment (Unix vs Windows)

2006-07-11 Thread Bulat Ziganshin
Hello Haskell, what is a best way to bring C constant (defined in header file) into the Haskell source? Haskell project is cabalized and should work with both Win and Unix while the constants are OS-specific. the best way i found at this moment is to use the following scheme: mmap.h: #if defined