Re: Language extensions - backwards compatibility

2010-01-29 Thread Iain Alexander
On 28 Jan 2010 at 15:45, Don Stewart wrote: > Could you talk a bit about why you need to support 6.4 onwards -- that > seems like quite a burden. Is the effort worth it? Good question. The code was developed on 6.4, and I would really quite like to continue 6.4 support for personal reasons, if no

Re: Language extensions - backwards compatibility

2010-01-29 Thread Iain Alexander
On 29 Jan 2010 at 13:50, Bulat Ziganshin wrote: > you can use compiler options or preprocess source before feeding it to ghc Separate preprocessing: If there were a preprocessor which was readily available in a typical Haskell installation and could be simply persuaded to do the job (e.g. as a

Re: Language extensions - backwards compatibility

2010-01-29 Thread Iain Alexander
On 29 Jan 2010 at 15:14, Malcolm Wallace wrote: > > The flag -P for traditional gnu cpp (or --noline for stand-alone > > cpphs) should suppress the initial #line noise. > > > > Does ghc still fail to recognise a module-start pragma, even if the > > only characters preceding it are whitespace?

Re: Language extensions - backwards compatibility

2010-01-29 Thread Malcolm Wallace
The flag -P for traditional gnu cpp (or --noline for stand-alone cpphs) should suppress the initial #line noise. Does ghc still fail to recognise a module-start pragma, even if the only characters preceding it are whitespace? I intended to give an example. file foo.h #if __GLASGO

Re: Language extensions - backwards compatibility

2010-01-29 Thread Bulat Ziganshin
Hello Iain, Friday, January 29, 2010, 2:38:27 AM, you wrote: > I'm looking for a way of specifying language extensions in a way which will > work in all versions of GHC from 6.4 onwards. you can use compiler options or preprocess source before feeding it to ghc -- Best regards, Bulat

Re: Language extensions - backwards compatibility

2010-01-29 Thread Malcolm Wallace
Any sort of preprocessing at the beginning of a file appears to insert enough noise to inhibit recognition of file-header pragmas. (Cpphs doesn't appear to help here.) The flag -P for traditional gnu cpp (or --noline for stand-alone cpphs) should suppress the initial #line noise. Does ghc

Re: Language extensions - backwards compatibility

2010-01-29 Thread Simon Marlow
On 28/01/10 23:38, Iain Alexander wrote: I'm looking for a way of specifying language extensions in a way which will work in all versions of GHC from 6.4 onwards. GHC 6.4 does not support the LANGUAGE pragma. Specifying language options in the OPTIONS_GHC pragma starts to produce deprecation wa

Re: Language extensions - backwards compatibility

2010-01-28 Thread Don Stewart
ia: > I'm looking for a way of specifying language extensions in a way which will > work in all versions of GHC from 6.4 onwards. > > GHC 6.4 does not support the LANGUAGE pragma. Specifying language options in > the OPTIONS_GHC pragma starts to produce deprecation warnings in 6.10, and > wi

Language extensions - backwards compatibility

2010-01-28 Thread Iain Alexander
I'm looking for a way of specifying language extensions in a way which will work in all versions of GHC from 6.4 onwards. GHC 6.4 does not support the LANGUAGE pragma. Specifying language options in the OPTIONS_GHC pragma starts to produce deprecation warnings in 6.10, and will presumably ev