On Mon, 13 Dec 2010, John Meacham wrote:
A better plan would be to start depending on 'haskell2010' or
'haskell98' and get rid of explicit dependencies on 'base' altogether.
Since those are standardized between compilers.
I admit that once in the past I have replaced all dependencies on
'has
On 1 December 2010 03:54, Michael Snoyman wrote:
> On Wed, Dec 1, 2010 at 4:07 AM, Thomas Schilling
> wrote:
>> I think a nicer way to solve that issue is to use Cabal's MIN_VERSION macros.
>>
>> 1. Add CPP to your extensions. This will cause cabal to
>> auto-generate a file with MIN_VERSION_ m
A better plan would be to start depending on 'haskell2010' or
'haskell98' and get rid of explicit dependencies on 'base' altogether.
Since those are standardized between compilers.
John
On Tue, Dec 7, 2010 at 6:59 PM, Brandon S Allbery KF8NH
wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 12/7/10 06:00 , Henning Thielemann wrote:
> Brandon S Allbery KF8NH wrote:
>> Since the base package is (with good reason) part of the compiler, anyone
>> smart enough to get that to work is smart enough to edit the cabal file.
>
> There are good r
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 12/5/10 17:05 , Henning Thielemann wrote:
> Isn't it better to move the dependency on 'base' out of the If block? I
> mean, someone might succeed to use GHC-7 with base-4.2 or GHC<7 or a
> different compiler with base-4.3.
Since the base package is
Jason Dagit schrieb:
> I see that others have provided answers on here, but another way is to
> change the check from:
>
>if flag(ghc7)
>build-depends: base >= 4.3 && < 5
>cpp-options: -DGHC7
>else
>build-depends: base
On Wed, Dec 1, 2010 at 6:58 PM, Claus Reinke wrote:
>> This is obviously a personal preference issue, but I try to avoid the
>> Cabal macros since they don't let my code run outside the context of
>> Cabal. I often times like to have a test suite that I can just use
>> with runhaskell, and (unless
This is obviously a personal preference issue, but I try to avoid the
Cabal macros since they don't let my code run outside the context of
Cabal. I often times like to have a test suite that I can just use
with runhaskell, and (unless you can tell me otherwise) I can't run it
anymore.
Also, I thi
On Wed, Dec 1, 2010 at 4:07 AM, Thomas Schilling
wrote:
> I think a nicer way to solve that issue is to use Cabal's MIN_VERSION macros.
>
> 1. Add CPP to your extensions. This will cause cabal to
> auto-generate a file with MIN_VERSION_ macros for each in
> build-depends.
>
> 2. GHC 6.12.* com
I think a nicer way to solve that issue is to use Cabal's MIN_VERSION macros.
1. Add CPP to your extensions. This will cause cabal to
auto-generate a file with MIN_VERSION_ macros for each in
build-depends.
2. GHC 6.12.* comes with template-haskell 2.4, so to test for that use:
#ifdef MIN_VE
On Sat, Nov 27, 2010 at 9:59 AM, Jinjing Wang wrote:
> Thanks Michael,
>
> So the user should use `cabal install --flags -ghc7 package-name` to
> install the package, if I'm not mistaken?
>
> Will it work if the package is installed as a dependency? Will the
> flag environment be passed down from
Thanks for explaining, it's a nice trick.
On Sun, Nov 28, 2010 at 11:16 AM, Antoine Latter wrote:
> On Sat, Nov 27, 2010 at 8:38 PM, Jinjing Wang wrote:
>> Hi Michael, you are absolutely correct, cabal did set the flags
>> automatically.
>>
>> To sum up, here's what needs to be done:
>>
>> * ad
Hi Antoine, Thanks for pointing out, it did work.
By using a record style constructor, the code can be made to support
both version, something like
here = QuasiQuoter
{
quoteExp = (litE . stringL)
, quotePat = (litP . stringL)
}
in GHC7 there's a warning:
Wa
On Sat, Nov 27, 2010 at 8:38 PM, Jinjing Wang wrote:
> Hi Michael, you are absolutely correct, cabal did set the flags automatically.
>
> To sum up, here's what needs to be done:
>
> * add `flag ghc7` as a field in cabal
> * add:
>
> if flag(ghc7)
> build-depends: base
Hi Michael, you are absolutely correct, cabal did set the flags automatically.
To sum up, here's what needs to be done:
* add `flag ghc7` as a field in cabal
* add:
if flag(ghc7)
build-depends: base >= 4.3 && < 5
cpp-options: -DGHC7
else
On Sat, Nov 27, 2010 at 9:41 PM, Antoine Latter wrote:
> On Sat, Nov 27, 2010 at 10:59 AM, Jinjing Wang wrote:
>> Dear list,
>>
>> >From ghc 7.0.1 release notes:
>>
>>> The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields:
>>> quoteType and quoteDec.
>>
>> Some of my code needs to b
On Sat, Nov 27, 2010 at 10:59 AM, Jinjing Wang wrote:
> Dear list,
>
> >From ghc 7.0.1 release notes:
>
>> The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType
>> and quoteDec.
>
> Some of my code needs to be conditionally compiled to support both
> version 6 and 7, what i
No, the user doesn't need to do anything. By splitting up the "base"
range into pre-7 and post-7, cabal automatically applies the ghc7 flag
(and thus adds the GHC7 CPP declaration) as appropriate.
Michael
On Sat, Nov 27, 2010 at 7:59 PM, Jinjing Wang wrote:
> Thanks Michael,
>
> So the user shou
Sorry, should be `cabal install --flags="ghc7" package-name`.
On Sun, Nov 28, 2010 at 1:59 AM, Jinjing Wang wrote:
> Thanks Michael,
>
> So the user should use `cabal install --flags -ghc7 package-name` to
> install the package, if I'm not mistaken?
>
> Will it work if the package is installed as
Thanks Michael,
So the user should use `cabal install --flags -ghc7 package-name` to
install the package, if I'm not mistaken?
Will it work if the package is installed as a dependency? Will the
flag environment be passed down from the root package?
Is there a way to detect GHC version automatica
On Sat, Nov 27, 2010 at 6:59 PM, Jinjing Wang wrote:
> Dear list,
>
> >From ghc 7.0.1 release notes:
>
>> The Language.Haskell.TH.Quote.QuasiQuoter type has two new fields: quoteType
>> and quoteDec.
>
> Some of my code needs to be conditionally compiled to support both
> version 6 and 7, what is
Robin Green wrote:
> I am writing some code for citation support in gitit, and all the
> #ifdefs I'm using to do conditional compilation are a bit tiresome.
>
> Suppose you have the requirement that a certain feature of your
> software be disable-able at compile time, to avoid having to pull in
>
On Fri, 27 Mar 2009, Robin Green wrote:
I am writing some code for citation support in gitit, and all the
#ifdefs I'm using to do conditional compilation are a bit tiresome.
I live well without CPP in Haskell. When I need conditional compilation I
create two directories with modules of the s
Hi Robin,
On Fri, Mar 27, 2009 at 16:13, Robin Green wrote:
> Suppose you have the requirement that a certain feature of your
> software be disable-able at compile time, to avoid having to pull in
> certain dependencies (which may not be available on all platforms).
> Disabling a feature may enta
24 matches
Mail list logo