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
The current implementation generates empty clauses in guard expressions, assuming that the returned value is always of type unit. This is not sufficiently expressive since functions can return any type. The return type of functions is advertised by function specs, which the translation currently does not use.
This needs to be addressed accordingly. Potentially, the solution requires the return type of the function to be propagated to receive expressions in functions, such that this is readily available to the translation pass. This way, the translation can generate the concrete unit datum (e.g. 0 for integers, () for unit, 0.0 for floats, "" for strings, etc.), which would enable Pat to type check successfully. This is only an intermediate solution.
The proper way would be to introduce a general type in Pat e.g. any, which would be the supertype of all Pat types. Alternatively, we can also introduce an undefined value that belongs to all types.
The text was updated successfully, but these errors were encountered:
The current implementation generates
empty
clauses inguard
expressions, assuming that the returned value is always of typeunit
. This is not sufficiently expressive since functions can return any type. The return type of functions is advertised by function specs, which the translation currently does not use.This needs to be addressed accordingly. Potentially, the solution requires the return type of the function to be propagated to
receive
expressions in functions, such that this is readily available to the translation pass. This way, the translation can generate the concrete unit datum (e.g.0
for integers,()
for unit,0.0
for floats,""
for strings, etc.), which would enable Pat to type check successfully. This is only an intermediate solution.The proper way would be to introduce a general type in Pat e.g.
any
, which would be the supertype of all Pat types. Alternatively, we can also introduce anundefined
value that belongs to all types.The text was updated successfully, but these errors were encountered: