Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

alet dependency inference #153

Open
mccraigmccraig opened this issue Feb 23, 2016 · 1 comment
Open

alet dependency inference #153

mccraigmccraig opened this issue Feb 23, 2016 · 1 comment
Labels

Comments

@mccraigmccraig
Copy link
Contributor

the alet macro seems to require that variables are referenced in the top-level of binding forms in order to infer dependencies

thus when i am calling some functions created with defnk i have to add artificial do blocks and explicitly refer to dependent variables like this https://www.refheap.com/88d7eba3d8eb9c73e2834f4d4

this seems like a reasonable limitation for the macro - but should be documented

@ghost ghost added the bug label Feb 23, 2016
@ghost
Copy link

ghost commented Feb 23, 2016

Hmm, this limitation shouldn't be there. You should be able to write:

(with-context pm/promise-context
    (alet [api-version (version {})
           auth-user (retrieve-user {:token token})
           auth-org-users (get-auth-org-users {:auth-user auth-user})
    ;; ...

Going to take a look at this, thanks for reporting!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant