You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, function definitions must be provided in the parsing step, so data relevant to their definition must be available at that step. This request is to support binding a function at activation time instead. As a use case example, I'd like to write a function has_tag :: string -> bool whose implementation checks membership in a list tags that is only available at evaluation time and remains hidden from the expression writer.
The text was updated successfully, but these errors were encountered:
We're discussing a generalization of this - allow functions to access the full Activation, not just the supplied variables. This way you could bind tags as a variable at runtime in the normal way, but it would be hidden from the expression if you omit it from the declarations at type check time. This would require a separate flavor of overload which would accept something like func(interpreter.Activation, ...ref.Val) ref.Val.
Currently, function definitions must be provided in the parsing step, so data relevant to their definition must be available at that step. This request is to support binding a function at activation time instead. As a use case example, I'd like to write a function
has_tag :: string -> bool
whose implementation checks membership in a listtags
that is only available at evaluation time and remains hidden from the expression writer.The text was updated successfully, but these errors were encountered: