suggestion: add a .ehs file type

Wolfgang Jeltsch g9ks157k at acme.softbase.org
Thu Nov 22 19:50:16 EST 2007


Am Donnerstag, 22. November 2007 02:07 schrieb Alex Jacobson:
> Duncan Coutts wrote:
> > On Wed, 2007-11-21 at 19:26 -0500, Alex Jacobson wrote:
> >> Ok, I'm game to default to haskell98 in the presence of ambiguity, but
> >> in most cases the extension involves new syntax and that should be
> >> enough.
> >
> > In these cases ghc does generally give an error message which mentions
> > which extension it is that you should use. This is actually better than
> > the case where you forget to import something when ghc doesn't helpfully
> > tell you which module you forgot to import.
>
> My point is that the default should be to give a warning rather than an
> error and provide the user with the ability to turn those warnings off.
>
> > As others have said, one major reason for declaring extensions is for
> > portability.
>
> The warning should be enough information for people who want to avoid
> accidentally adding features that will cause their code not to run on
> other compilers.  For those that don't care, forcing them to add
> zillions of pragmas is an excessive burden.
>
> -Alex-

Dont’t just think in terms of single modules.  If I have a Cabal package, I 
can declare used extensions in the Cabal file.  A user can decide not to 
start building at all if he/she sees that the package uses an extension 
unsupported by the compiler.

Best wishes,
Wolfgang


More information about the Glasgow-haskell-users mailing list