[Haskell-cafe] Re: Re: Allowing hyphens in identifiers
Colin Paul Adams
colin at colina.demon.co.uk
Tue Dec 15 13:30:09 EST 2009
>>>>> "Richard" == Richard O'Keefe <ok at cs.otago.ac.nz> writes:
Richard> The real point is that the revised version, with command
Richard> line arguments and all, is still just 52 SLOC. (41 if
Richard> you don't count type specifications the compiler could
Richard> have inferred or the two import directives.)
This looks really good.
When I first started writing Haskell seriously, just over a year ago,
I wrote with underscores, but the mix of style caused by the standard
library names was so disconcerting that
IReluctantlySwitchedToHumpyIlliterateStyle (though not for comments,
where I stuck to standard English punctuation).
So I welcome this chance to switch to natural English style (hyphens).
The main that puzzles me at the moment is how to write a cabal
file. That is, I can specify the ghc options to invoke the
preprocessor in the cabal file, but this supposes the compiled program
is available on the system concerned. This won't necessarily be the
case if I distribute code written in this style on hackage.
So the answer seems to be to release this preprocessor on hackage,
and then make it a dependcy. But can a library depend upon an
executable program? looking at the Cabal users guide, I can't see
anywhere that says it can't.
More information about the Haskell-Cafe