How to make a CAF not a CAF in Haskell?
问题 How do I make a Constant Applicative Form into, well, not a Constant Applicative Form, to stop it being retained for the lifetime of the program? I\'ve tried this approach: -- | Dummy parameter to avoid creating a CAF twoTrues :: () -> [[[Bool]]] twoTrues _ = map (++ (True : repeat False)) . trueBlock <$> [1..] but it doesn\'t seem to work - the profile shows it as still being retained and still marks it as a CAF. I\'ve found one relevant Google result on this, a reply by Simon Peyton-Jones