
Facundo 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 Simon | -----Original Message----- | From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of | Facundo DomÃnguez | Sent: 03 March 2016 19:41 | To: ghc-devs@haskell.org | Subject: Local bindings in the static form | | Hello, | 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) | where | 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 | bindings.). | | We would need for this implementation a way to test closedness in this | sense. Could there be any similar test implemented already in GHC? | | Thanks, | Facundo | | [1] https://ghc.haskell.org/trac/ghc/ticket/11656 | _______________________________________________ | ghc-devs mailing list | ghc-devs@haskell.org | https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.ha | skell.org%2fcgi-bin%2fmailman%2flistinfo%2fghc- | devs&data=01%7c01%7csimonpj%40064d.mgd.microsoft.com%7cead97b273efa41c1 | a49608d3439bd142%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Z1TbBcSgd | YLZ%2bXrMJVMvqJIfwc4R2kLeRaPPwuQ5%2fLQ%3d