Currently import goggles._ is not "batteries included", meaning that the *, ? and [] operators won't do anything until implicit m.f.Each, Possible and Index instances are imported or created.
Either:
a) import goggles._ should include default instance imports
b) The error message should be very helpful when the missing implicit is for a Monocle-supported instance, specifically suggesting the required Monocle import.
Including a bunch of instances by default is convenient, but seems like a bad idea; most libraries (including Monocle) now separate instance or syntax imports from their core concepts. Otherwise the user will be poorly equipped to reason about the consequence when default implicit instances swordfight with new ones.
On the other hand, really helpful error messages is what Goggles is all about; the user might be mildly inconvenienced by having to import something, but they will be fully informed.
This isn't a thing. Monocle's default instances are in the typeclass companion objects: Each, Possible, Index, etc, so scalac will automatically pick them up with no problems.
Currently
import goggles._
is not "batteries included", meaning that the*
,?
and[]
operators won't do anything until implicitm.f.Each
,Possible
andIndex
instances are imported or created.Either: a)
import goggles._
should include default instance imports b) The error message should be very helpful when the missing implicit is for a Monocle-supported instance, specifically suggesting the required Monocle import.Including a bunch of instances by default is convenient, but seems like a bad idea; most libraries (including Monocle) now separate instance or syntax imports from their core concepts. Otherwise the user will be poorly equipped to reason about the consequence when default implicit instances swordfight with new ones.
On the other hand, really helpful error messages is what Goggles is all about; the user might be mildly inconvenienced by having to import something, but they will be fully informed.