Syntax extensions (was: RE: The Future of Haskell discussion at
the Haskell Workshop)
ozone at vergenet.net
ozone at vergenet.net
Mon Sep 15 01:55:25 EDT 2003
On 11/09/2003, at 9:46 PM, Simon Marlow wrote:
>> I know that some of these problems can be addressed, at least in
>> part, by careful use of Makefiles, {-# custom pragmas #-}, and perhaps
>> by committing to a single tool solution. But I'd like to propose
>> a new approach that eliminates some of the command line complexities
>> by integrating the selection of language extensions more tightly
>> with the rest of the language.
>
> Initially I liked the idea, but now I'm not so sure (more about that
> later). But first I'll point out that the situation isn't nearly as bad
> as you make out. In GHC, the approved way to add these flags is by
> using a pragma to the source code, for example:
>
> {-# OPTIONS -fth -fffi #-}
> module Foo where
> ...
>
> this in itself addresses most of your complaints. Using a
> compiler-independent syntax would address another one. We're left
> with:
I'll second Simon on this suggestion. I'm using {-# OPTIONS ... #-}
pragmas on all my modules now, and it works great: no extra parameters
need to be specified on the command-line, and I get only the extensions
I want. This seems to be more simple than the hierarchical module
scheme, too. (I'm a big fan of KISS.)
--
% Andre Pang : trust.in.love.to.save
More information about the Haskell
mailing list