-fglasgow-exts in .cabal

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

-fglasgow-exts in .cabal

Imants Cekusins
How to specify defaultExtensions in cabal (1.22) file?

e.g.
 -fglasgow-exts or
 TypeSynonymInstances

?
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: -fglasgow-exts in .cabal

Sumit Sahrawat, Maths & Computing,
 IIT (BHU)

On 9 July 2015 at 20:02, Imants Cekusins <[hidden email]> wrote:
How to specify defaultExtensions in cabal (1.22) file?

e.g.
 -fglasgow-exts or
 TypeSynonymInstances

?
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners



--
Regards

Sumit Sahrawat

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: -fglasgow-exts in .cabal

Imants Cekusins
Thank you Sumit.

This is how far I got:

if I put this right after hs-source-dirs:

default-extensions:  FlexibleInstances

, it works: ghc asks for MultiParamTypeClasses option.

However if I add FlexibleInstances, MultiParamTypeClasses
- either separated with comma or on the next line, the compiler parses
.cabal and tries to build however prompts for FlexibleInstances again.

How would I specify >1 option?
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: -fglasgow-exts in .cabal

Sumit Sahrawat, Maths & Computing,
 IIT (BHU)
I used to take a look at cabal files from projects that I've used and found to work. For example, IHaskell uses a lot of extensions [1].


On 9 July 2015 at 21:32, Imants Cekusins <[hidden email]> wrote:
Thank you Sumit.

This is how far I got:

if I put this right after hs-source-dirs:

default-extensions:  FlexibleInstances

, it works: ghc asks for MultiParamTypeClasses option.

However if I add FlexibleInstances, MultiParamTypeClasses
- either separated with comma or on the next line, the compiler parses
.cabal and tries to build however prompts for FlexibleInstances again.

How would I specify >1 option?



--
Regards

Sumit Sahrawat

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: -fglasgow-exts in .cabal

Imants Cekusins
Cheers Sumit. it worked:

default-extensions:   FlexibleInstances
                      MultiParamTypeClasses
                      TypeSynonymInstances

needed to run cabal clean, then cabal build.

this needs to be specified in both library & test-suite spec section


hope this helps someone.
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners