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
when working on #1171 I found a pattern which was useful:
external def todo(ignore: x) -> forall a. a
this function can consume arguments to make them look used, and then return anything. Of course, you can't have a function like that at runtime.
On way to avoid that is to only add that function to predef when in type-check mode. In that case, we never even emit anything, any so it can't be unsafe. This could also be used by a language server in the IDE, since you don't need the compiled outputs in that case either.
If we had a resident server that could cache memory, we could keep a cache of compiled packages for dependencies but only use it for type-checking (or rather, the cache key can depend on if we are in type check mode or not).
The text was updated successfully, but these errors were encountered:
when working on #1171 I found a pattern which was useful:
this function can consume arguments to make them look used, and then return anything. Of course, you can't have a function like that at runtime.
On way to avoid that is to only add that function to predef when in
type-check
mode. In that case, we never even emit anything, any so it can't be unsafe. This could also be used by a language server in the IDE, since you don't need the compiled outputs in that case either.If we had a resident server that could cache memory, we could keep a cache of compiled packages for dependencies but only use it for type-checking (or rather, the cache key can depend on if we are in type check mode or not).
The text was updated successfully, but these errors were encountered: