
24 Sep
2008
24 Sep
'08
10:03 p.m.
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 declarator. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH