Fix a nasty float-in bug
authorsimonpj@microsoft.com <unknown>
Fri, 22 Aug 2008 13:34:27 +0000 (13:34 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 22 Aug 2008 13:34:27 +0000 (13:34 +0000)
This is a long-standing bug in FloatIn, which I somehow managed to
tickle (it's actually surprisingly hard to provoke which is why
it has not shown up before).

The problem was that we had a specialisation like this:

  let
f_spec = ...
  in let
{-# RULE f Int = f_spec #-}
f = ...
  in
<body>

The 'f_spec' binding was being floated inside the binding for 'f',
which makes the RULE invalid becuase 'f_spec' isn't in scope.

We just need to add the free variables of the RULE in the right
places...


No differences found