[Haskell] Space behaviour & hyperseq
afc at aber.ac.uk
Thu Jun 17 09:00:44 EDT 2004
> 1) Is there a more efficient definition of hyperseq that does not traverse
> the data structure twice? The "show" function traverses the structure once
> but I found it to be much slower.
I think DeepSeq is what you're looking for. I've had all these problems
and more and written down the advice people gave me at
http://users.aber.ac.uk/afc/stricthaskell.html (DeepSeq is included as
> 2) In this application the uses of lazy evaluation are rare and easily
> eliminated (zip xs [1..] and so on); is there some hidden GHC option that
> evaluates everything strictly?
I'd like this too.
More information about the Haskell