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
Is the ? in let io @ { ? } = import! std.io for bringing in the implicit argument implementations, so let io = import! std.io and let io @ { ? } = import! std.io only differs in how the implicit arguments are searched, but what resides in io is the same? If so, how does the compiler chooses the implementation for implicit arguments, and I'm assuming the implementations for a certain type comes from the module that contains the type (so std.monad.Monad for std.io.IO resides in std.io.IO.monad)? If yes, why not just look inside the module instead of a implicit argument registry? In other words, is there any case where someone would want to import some type from a module and not import the implicit argument implementations? Sorry for a lot of questions!
Edit: I originally noticed this by thinking that the ? is like * in use gluon::*, as a glob import, but found out this is not working:
let io = import! std.io
seq io.wrap ()
io.wrap ()
where Implicit parameter with type `std.monad.Monad std.io.IO` could not be resolved.
The text was updated successfully, but these errors were encountered:
Is the
?
inlet io @ { ? } = import! std.io
for bringing in the implicit argument implementations, solet io = import! std.io
andlet io @ { ? } = import! std.io
only differs in how the implicit arguments are searched, but what resides inio
is the same? If so, how does the compiler chooses the implementation for implicit arguments, and I'm assuming the implementations for a certain type comes from the module that contains the type (sostd.monad.Monad
forstd.io.IO
resides instd.io.IO.monad
)? If yes, why not just look inside the module instead of a implicit argument registry? In other words, is there any case where someone would want to import some type from a module and not import the implicit argument implementations? Sorry for a lot of questions!Edit: I originally noticed this by thinking that the
?
is like*
inuse gluon::*
, as a glob import, but found out this is not working:where
Implicit parameter with type `std.monad.Monad std.io.IO` could not be resolved.
The text was updated successfully, but these errors were encountered: