Strictness Information (Was: ghc --make feature request)

Simon Marlow simonmar@microsoft.com
Fri, 26 Oct 2001 15:15:36 +0100


> On Friday 26 October 2001 14:41, Jan-Willem Maessen wrote:
>=20
> > 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.
>=20
> Is there a way to automatically discover the strictness of a=20
> function?  I=20
> think it would be really usefull to have some kind of=20
> extended :t command in=20
> ghci which would do something like:
>=20
> main> :T foo
> foo :: A (Strict) -> A (Strict) -> Bool
> main> :T bar
> bar :: a (Lazy) -> [a] (Lazy) -> [a]
>=20
> 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