filename suffixes

Ross Paterson ross@soi.city.ac.uk
Fri, 13 Sep 2002 15:36:56 +0100


I have a Hugs patch that I'd like to get in, if possible.

It makes the set of suffixes for Haskell modules user-configurable
via a -S option, analogous to -P for search paths.  For example, with
the invocation

	hugs -S:.y:.ly

the suffix list becomes .hs:.lhs:.y:.ly and when importing a module
Foo it tries Foo.hs, Foo.lhs, Foo.y and Foo.ly.  I find it useful in
conjunction with the preprocessor option: the preprocessor can use the
suffix to decide how to turn the file into Haskell.  Perhaps there are
other uses.  The patch is at:

	http://www.soi.city.ac.uk/~ross/hugs-patch

It's fairly long, but the last half is all repetition.