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