Proposal: Add an analogue of $! to deepseq

Sebastian Fischer fischer at nii.ac.jp
Fri Jul 1 17:29:03 CEST 2011


> infixr 0 $!!

+1

Incedentally, Curry already has it:
http://www.informatik.uni-kiel.de/~pakcs/lib/CDOC/Prelude.html#$!!

> force :: (NFData a) => a -> a
> force x = x `deepseq` x

Might be a bit confusing as it forces NF only when HNF is forced
(which might be later than expected by people not too familiar with
laziness).

Sebastian



More information about the Libraries mailing list