Bang patterns
Simon Peyton-Jones
simonpj at microsoft.com
Mon Feb 6 06:09:11 EST 2006
Earlier on the Haskell' list, I proposed bang patterns as a way to make
it more convenient for Haskell programmers to make their programs
stricter. E.g.
f (!x, y) = ....
I've documented the proposal here
http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/BangPatter
ns
I've implemented it in GHC, so you can try it out. Use
-fbang-patterns
to enable bang patterns. If you use -fglasgow-exts you get
-fbang-patterns as well. If you don't want that, use -fglasgow-exts
-fno-bang-patterns.
I'd be interested to hear your experiences. (Committee members: do add
notes to the Wiki page giving pros and cons.)
Simon
More information about the Haskell-prime
mailing list