suggestion: add a .ehs file type

Robin Bate Boerop robin_bb at acm.org
Thu Dec 13 16:47:25 EST 2007


Distribution.Simple.PreProcess could be extended to register
SearchPath as a preprocessor for .ehs files (see stuff near
PPSuffixHandler).  Of course, this requires changing Cabal.
Alternately, I think the same effect could be had using Cabal's
UserHooks (see stuff near hookedPreProcessors).

That way, SearchPath users could continue to ignore Cabal, but Cabal
would preprocess .ehs files correctly (if users have SearchPath
installed) and Cabal users would be happy.

(This discussion interests me because I share Alex's opinion about
adding LANGUAGE pragmas to source files.)

On 12/12/2007, Alex Jacobson <alex at alexjacobson.com> wrote:
> Right now I have it automatically add -glasgow-exts unless the user
> explicitly turns it off.  I prefer to have packages that are also cabal
> compatible....  If there is a way to get cabal also to preprocess .ehs
> correctly then we are good to go!
>
> -Alex-
>
> Robin Bate Boerop wrote:
> > Alex, Lennart's suggestion makes me think: Why not make SearchPath
> > into a preprocessor?  It could recognize a .ehs extension, and then do
> > some very simple preprocessing (adds pragmas according to user's
> > settings).

-- 
Robin Bate Boerop


More information about the Glasgow-haskell-users mailing list