ethul / purescript-angular

AngularJS 1.2 bindings for PureScript (currently in the experimental stage)
MIT License
23 stars 3 forks source link

Duplicate label "ngrscope" in row #24

Closed ethul closed 9 years ago

ethul commented 9 years ago

The todomvc example fails to compile due to Duplicate lable "ngrscope" in row.

@dylex I know we tightened up the effects in pull request #21, but reverting to the following solves the issue.

modifyScope :: forall e f a b. ({ | a} -> Eff f { | b }) -> Scope a -> ReadWriteEff e Unit

Do you have any thoughts on this? I would prefer to have it without the f type parameter, but maybe we can't? Maybe there is something else going on here though.

dylex commented 9 years ago

0.6 no longer allows duplicate row labels, which means that types that like this explicitly disallow the effects in the result from occurring in arguments. The above seems to be the recommended workaround. There are other places that this may be an issue: with timeout for example one may wish to schedule more timeouts in the timeout function, so all the Eff could change to TimeoutEff.

dylex commented 9 years ago

Assuming they use the same effect row variables that is. I don't see anywhere else that does so this may be good enough for now.

ethul commented 9 years ago

Gotcha. Thanks for the fix. This does indeed work.

Do you want to push your change? Or I can make the update. Let me know what you prefer.

ethul commented 9 years ago

Thanks!