Or use a preprocessor that inserts a LANGUAGE pragma. :)<br><br><div class="gmail_quote">On Nov 22, 2007 9:14 AM, Simon Marlow <<a href="mailto:simonmarhaskell@gmail.com">simonmarhaskell@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Alex Jacobson wrote:<br><br>> In any case, I'm pretty sure the correct answer is not 50 language<br>> pragmas with arbitrary spellings for various language features at the<br>> top of each source file.
<br><br></div>You probably won't like any of these, but there are many ways to avoid<br>writing out all the pragmas at the top of each file.<br><br>1. Use Cabal's extensions field.<br><br>2. Use CPP<br><br>MyExtensions.h
:<br><div class="Ih2E3d">{-# LANGUAGE TemplateHaskell, FlexibleInstances,<br> OverlappingInstances, UndecidableInstances, CPP,<br> ScopedTypeVariables, PatternSignatures, GADTs,<br> PolymorphicComponents, FlexibleContexts,
<br> MultiParamTypeClasses, DeriveDataTypeable,<br> PatternGuards #-}<br><br></div>MyModule.hs:<br>{-# LANGUAGE CPP #-}<br>#include "MyExtensions.h"<br><br>3. Use a shell alias<br><br>alias ghce='ghc -XTemplateHaskell -XFlexibleInstances ...'
<br><br>4. use a script wrapper for GHC<br><br>#!/bin/sh<br>exec ghc -XTemplateHaskell -XFlexibleInstances ... $*<br><br>I'm sure there are more...<br><br>Cheers,<br><font color="#888888"> Simon<br></font><div>
<div></div><div class="Wj3C7c"><br>> -Alex-<br>><br>> Simon Marlow wrote:<br>>> Alex Jacobson wrote:<br>>>> I'm fine with that as well. I'm just opposed to being force to look<br>>>> up the precise names the compiler happens to use for each language
<br>>>> extension I happen to use. Having -fglasgow-exts turned on by<br>>>> default also works.<br>>><br>>> -fglasgow-exts is a historical relic. It's just an arbitrary<br>>> collection of extensions. It doesn't contain all the extensions
<br>>> provided by GHC, as many of them steal syntax and you probably don't<br>>> want them all on at the same time. We're trying to move away from<br>>> -fglasgow-exts, which is why GHC 6.8.1 provides separate flags for all
<br>>> the extensions we provide. Eventually we'll have a new standard<br>>> (Haskell' or whatever) that will collect many of the extensions<br>>> together, so you'll just have to write {-# LANGUAGE Haskell' #-}.
<br>>><br>>> Cheers,<br>>> Simon<br>>> _______________________________________________<br>>> Glasgow-haskell-users mailing list<br>>> <a href="mailto:Glasgow-haskell-users@haskell.org">
Glasgow-haskell-users@haskell.org</a><br>>> <a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>><br>><br>
<br>_______________________________________________<br>Glasgow-haskell-users mailing list<br><a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br></div></div></blockquote></div><br>