RE: Strictness Information (Was: ghc --make feature request)
On Friday 26 October 2001 14:41, Jan-Willem Maessen wrote:
You just need to change (for example) the strictness properties of the function, which can be very easy to do when making changes to your code.
Is there a way to automatically discover the strictness of a function? I think it would be really usefull to have some kind of extended :t command in ghci which would do something like:
main> :T foo foo :: A (Strict) -> A (Strict) -> Bool main> :T bar bar :: a (Lazy) -> [a] (Lazy) -> [a]
Perhaps this is possible already, and I just don't know about it.
This may be possible for entities from compiled modules, but GHCi can't do strictness analysis for interpreted modules (due to quite boring reasons - the byte-code backend can't quite handle the output from some of the optimisation passes). That's an interesting suggestion anyway, we'll bear it in mind. Cheers, Simon
participants (1)
-
Simon Marlow