[Haskell-cafe] cabal running multiple preprocessors on one file -
suggestion
Marc Weber
marco-oweber at gmx.de
Thu Dec 21 13:26:27 EST 2006
Am I right that the way to do this now is create your own preprocessor
run on files havirg your extionsion?
What about naming the source files eg Module.hs.cpp.di.gc.chs ?
This would mean first run c2hs, then greencard thin DrIft then cpp and
put the results in
Module.hs.cpp.di.gc.chs 1)
Module.hs.cpp.di.gc 2)`
Module.hs.cpp
Module.hs
pro : you see immediately which preprocessors are to be invoked
you don't need write your own preprocessor handler..
con : There are to much possibilities to use doesFileExist?
so the way to get the source file is using getDirectoryContents
and filter by regex \.hs.* \.lhs.* matches and take longest
filename (So that 1) will be perefered over 2)
You need a customizable editor to set filetype by regular
expression rather by (.gc .hs .lhs .chs ..)
What do you think, would this be an enhancement?
I'd like to implement this and provide a darcs patch to cabal 1.1.7
Any ideas/ comments on this?
Marc
More information about the Haskell-Cafe
mailing list