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
A value of type Type is a type in the later phase (typically a macro executes at phase 1 and manipulates terms and types from phase 0). We can write (the (Maybe Integer) (just 42)) to construct a value of type (Maybe Integer), but we can't write (the Type (Maybe Integer)) to construct a value of type Type, because the Maybe macro is only valid in the type and type-pattern contexts, it is not valid in the expression context.
I propose a macro the-type which can be used this way:
(type-case (the-type (Maybe Integer))
...)
The macro the-type would expand (Maybe Integer) in the type context in the later phase (in this example (type-case ...) and (the-type ...) are executing at phase 1, and (Maybe Integer) would be expanded at phase 0).
The text was updated successfully, but these errors were encountered:
A value of type
Type
is a type in the later phase (typically a macro executes at phase 1 and manipulates terms and types from phase 0). We can write(the (Maybe Integer) (just 42))
to construct a value of type(Maybe Integer)
, but we can't write(the Type (Maybe Integer))
to construct a value of typeType
, because theMaybe
macro is only valid in the type and type-pattern contexts, it is not valid in the expression context.I propose a macro
the-type
which can be used this way:The macro
the-type
would expand(Maybe Integer)
in the type context in the later phase (in this example(type-case ...)
and(the-type ...)
are executing at phase 1, and(Maybe Integer)
would be expanded at phase 0).The text was updated successfully, but these errors were encountered: