15 Mar
2002
15 Mar
'02
6:29 p.m.
Simon Marlow writes (to the Haskell mailing list)
The function as written is only strict in its list argument, and its usage site only demands the 'l' argument strictly. So [..] the compiler can't possibly evaluate the accumulating parameters of countAll' strictly.
The Clean compiler uses an optimisation that works in this case. After observing that main evaluates all elements of the tuple result (because of the shows), the compiler creates a special version of countAll with (Clean) type countAll :: String -> (!Int, !Int, !Int) and the same for countAll`. It than calls the strictness analyzer again for these functions. Cheers, Ronny Wichers Schreur
8932
Age (days ago)
8932
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ronny Wichers Schreur