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
No M a doesn't have a Syntax instance so ex2 would not be allowed.
I'm just assuming it might be useful to do things like setIx a i (1,2). Of course it's not much more typing to say setIx a i (resugar (1,2)), but it seems quite natural to make such functions as general as possible. The idea would be to generalize all polymorphic types Data a in the core language (but not e.g. Data [a] or Data Bool). The downside is that for functions like getIx, we lose some type inference (since a cannot be inferred from Internal a).
Currently, e.g. condition and forLoop are generalized to Syntax types, but their types don't mention Internal, so no type inference is lost.
Now that I think about it, the loss of type inference seems to kill this proposal. Maybe the rule-of-thumb should be to keep the core language interface free from type functions?
For example:
Is this a good idea?
The text was updated successfully, but these errors were encountered: