[Haskell-beginners] Haskell Preprocessor?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Wed Sep 24 22:03:35 EDT 2008
On 2008 Sep 24, at 21:57, Mike Sullivan wrote:
> What is the easiest and/or best way to define global "constants" in
> Haskell (avoiding any side effects, of course). The functionality
> I'm thinking of is similar to the use of global "const" variables or
> #defines in C code.
ghc at least *should* be smart enough to take
a = 5
and optimize all uses of "a" away via inlining, giving you a constant
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners