ref6 example from StaticPointers documentation doesn't type check
The documentation for
StaticPointers contains the following example.
ref6 y = let x = 1 in static x
but this doesn't get accepted by the type checker.
sp.hs:27:23: error: • ‘x’ is used in a static form but it is not closed because it has a non-closed type because it contains the type variables: ‘p_a7KP’ • In the expression: static x In the expression: let x = 1 in static x In an equation for ‘ref6’: ref6 y = let x = 1 in static x | 27 | ref6 y = let x = 1 in static x | ^^^^^^^
I tested on 8.6.1, 8.4.3, 8.2.2, 8.02, 7.10.3 and all fail.