Interpreting the strictness annotations output by ghc --show-iface

John Meacham john at repetae.net
Thu Mar 8 00:27:55 CET 2012


On Wed, Mar 7, 2012 at 3:26 PM, John Meacham <john at repetae.net> wrote:
> L = lazy
> S = strict
> A = absent
>
> f :: Int -> (Char,Char) -> Int -> Char
>
> LS(S,L)A
>
> means that it is lazy in the first int, strict in the tuple, strict in
> the first argument of the tuple but lazy in the second and the third
> argument is not used at all. I have a paper that describes it
> somewhere. I modeled the jhc strictness analyzer after the ghc one
> (with minor hindsight improvements) so pored over the ghc one for
> quite a while once upon a time.

Oh, and the (..) works for all CPR types, not just tuples.

   John



More information about the Glasgow-haskell-users mailing list