Local bindings in the static form
Simon Peyton Jones
simonpj at microsoft.com
Fri Mar 4 10:47:34 UTC 2016
Yes, that makes perfect sense. Moreover, it is pretty much exactly what the tct_closed flag on `ATcId` does.
The trick will be to guarantee that all those Ids do in fact end up being floated out.
We could have a Skype chat about this, preferably after the March 16 ICFP deadline
| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of
| Facundo Domínguez
| Sent: 03 March 2016 19:41
| To: ghc-devs at haskell.org
| Subject: Local bindings in the static form
| At Tweag I/O we are considering relaxing a bit the constraints on the
| static form.
| static <exp>
| demands <exp> to be closed. That is, the free variables of <exp> must
| be bound at the top level.
| However, it would be fine to allow local bindings too. For instance:
| test :: StaticPtr ([[Int]] -> [[Int]])
| test x = static (filter hasZero)
| hasZero = any isZero
| isZero = (0 ==)
| Where hasZero is local but its body can be considered kind of closed
| (all free variables refer to top-level bindings or other *closed* local
| We would need for this implementation a way to test closedness in this
| sense. Could there be any similar test implemented already in GHC?
|  https://ghc.haskell.org/trac/ghc/ticket/11656
| ghc-devs mailing list
| ghc-devs at haskell.org
More information about the ghc-devs