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
There is a problem when trying to implement an instance of T2.
# ERROR # @instance T2{Int,Bool} begin@import h
h(b::Bool) =falseend
The @import keyword within the @instance macro is commonly used when something has been implemented already. However, in this case, we cannot @import h because then h(::Bool) is not one of the expected signatures and it errors upon seeing that line.
I'll upload a fix to this soon that is working locally: basically it changes what @import does within the instance macro. Rather than removing expected signatures, whenever we have leftover unimplemented signatures (such as h(::Int) in the case above) we check if the name of the method is in the imports and ignore the missing method error if so.
The text was updated successfully, but these errors were encountered:
GATs allow dispatching on types. Below theory
T2
adds a new operation with the nameh
:There is a problem when trying to implement an instance of
T2
.The
@import
keyword within the@instance
macro is commonly used when something has been implemented already. However, in this case, we cannot@import h
because thenh(::Bool)
is not one of the expected signatures and it errors upon seeing that line.I'll upload a fix to this soon that is working locally: basically it changes what
@import
does within the instance macro. Rather than removing expected signatures, whenever we have leftover unimplemented signatures (such ash(::Int)
in the case above) we check if the name of the method is in the imports and ignore the missing method error if so.The text was updated successfully, but these errors were encountered: