patch applied (haskell-prime-status): BangPatterns: probably
accept ==> undecided
Don Stewart
dons at galois.com
Wed Apr 16 11:06:28 EDT 2008
simonmarhaskell:
> Tue Apr 15 11:12:08 PDT 2008 Simon Marlow <simonmarhaskell at gmail.com>
> * BangPatterns: probably accept ==> undecided
>
> M ./status.hs -2 +3
I think we absolutely must have a story on bang patterns for H'.
They're now very widely used in low level code, where we either don't trust, or
need to tune, the strictness analyser.
And using CPP for this is just not acceptable, and I still cry a little inside
when I have to use
#define STRICT1(f) f a | a `seq` False = undefined
#define STRICT2(f) f a b | a `seq` b `seq` False = undefined
#define STRICT3(f) f a b c | a `seq` b `seq` c `seq` False = undefined
STRICT2(f)
f x y = ...
to achieve portability to Hugs/nhc98 of Data.ByteString.
In the list of features "required for Haskell in practice", bang patterns are
way up there.
-- Don
More information about the Haskell-prime
mailing list