Another static-pointer floating bug
Consider
```
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE StaticPointers #-}
module Foo where
import GHC.Exts
f :: Int# -> Int#
f 0# = 0#
f n# = f (n# -# 1#)
h x = let v = f 3# in static (I# (v +# 1#))
```
We get
```
Foo.hs:12:3: warning:
Found makeStatic nested in an expression
In the RHS of h :: forall {t :: * -> *} {p}.
IsStatic t =>
p -> t Int
In the body of lambda with binder t_axQ :: * -> *
In the body of lambda with binder p_axG :: *
In the body of lambda with binder $dIsStatic_aGq :: IsStatic t_axQ
In the body of lambda with binder x_ai3 :: p_axG
In an occurrence of makeStatic :: forall a.
(Int, Int) -> a -> StaticPtr a
```
The relevant code is
```
h = \ (@(t_axQ :: * -> *))
(@p_axG)
($dIsStatic_aGq :: IsStatic t_axQ)
_ [Occ=Dead] ->
case case lvl_sL1 of v_B1 { I# v_B2 -> v_B2 } of v_axK
{ __DEFAULT ->
fromStaticPtr
@t_axQ
$dIsStatic_aGq
@Int
(C:Typeable @(*) @Int $dTypeable_sL2)
(makeStatic @Int lvl_sL5 (I# (+# v_axK 1#)))
}
```
We can't float the `makeStatic` out because it mentions `v_axK`.
Problem is that the tyepchecker accepted the `static (...)` form even though it had an *unlifted* free variable.
issue