The Haskell report says that, by convention, only _HASKELL_ files have a .hs or .lhs extension. ------http://www.haskell.org/onlinereport/literate.html---------- By convention, the style of comment is indicated by the file extension, with ".hs" indicating a usual Haskell file and ".lhs" indicating a literate Haskell file ------------------------------ It is always a surprise when you try to load a .hs or .lhs file in hugs and discover that it really requires cpp. Either, cpp (or some preprocessor standard), should be made part of the Haskell language definition or Haskell files that require a preprocessor should have a different extension. Since, I assume that the hugs team has a good reason not to build in cpp functionality, I am suggesting that Haskell files with preprocessor directives have the extension .hs.cpp One could argue that Hugs is actualy more flexible because it supports any arbitrary preprocessor, but the substantive issue is that running each imported script through python & cpp adds substantial load time. This load time is much less acceptable in an interpreted environment, than in the compile time environment of GHC. In this environment, it is much better to "compile" .hs.cpp files into .hs files before runtime. In the case of Xtract, we are renaming all the files to .hs.cpp, generating a clean set of .hs files, and then running hugs. The alternative is just too slow. -Alex- ___________________________________________________________________ S. Alexander Jacobson Shop.Com 1-212-697-0184 voice The Easiest Way To Shop
CPP is not part of Haskell
S. Alexander Jacobson Thu, 30 Sep 1999 14:51:45 -0400 (Eastern Daylight Time)
- Re: CPP is not part of Haskell Alex Ferguson
- Re: CPP is not part of Haskell S. Alexander Jacobson
- Re: CPP is not part of Haskell Manuel M. T. Chakravarty
- RE: CPP is not part of Haskell Simon Peyton-Jones
- Re: CPP is not part of Haskell George Russell
- RE: CPP is not part of Haskell Manuel M. T. Chakravarty
- RE: CPP is not part of Haskell Frank A. Christoph
- Re: CPP is not part of Haskell Manuel M. T. Chakravarty
- Re: CPP is not part of Haskell George Russell
- Re: CPP is not part of Haskell Jan Skibinski
- Re: CPP is not part of Haskell Fergus Henderson
- Re: CPP is not part of Haskell Matthias Kilian