Adds the some feature in the established pattern, with a parser & generator file in a new feature package, solving #17
Of note:
Fixes the restriction we had on selecting fields with nested type parameters, like Option[A] or F[A].
The macro signature is now transparent inline, which allows us to choose the static return type inside the macro. The declared return type is Any, which we can replace with a more civilised top type when the optics live inside the same type hierarchy.
Extension method some available with a Focus._ import, for want of a better scheme.
Big refactor of ParserLoop, whose flaws were much more clearly visible with the addition of a second feature.
ParserLoop now knows nothing of the features and only performs iteration and assembly of the result.
Special treatment of the lambda argument has been separated from the feature matching.
FieldSelectParser now only exposes one public member, the FieldSelect pattern matching parser.
The TypeInfo type is deleted; it turned out to just be a FieldSelect thing, there was no need for this information in every FocusAction.
The composeOptics method in GeneratorLoop now has a case for every combination of Lens, Optional, Prism and Iso.
Brushed up the existing tests a bit to fit the pattern of Julien's test suite for some a bit better.
Adds the
some
feature in the established pattern, with a parser & generator file in a new feature package, solving #17Of note:
Option[A]
orF[A]
.transparent inline
, which allows us to choose the static return type inside the macro. The declared return type isAny
, which we can replace with a more civilised top type when the optics live inside the same type hierarchy.some
available with aFocus._
import, for want of a better scheme.ParserLoop
, whose flaws were much more clearly visible with the addition of a second feature.ParserLoop
now knows nothing of the features and only performs iteration and assembly of the result.FieldSelectParser
now only exposes one public member, theFieldSelect
pattern matching parser.TypeInfo
type is deleted; it turned out to just be aFieldSelect
thing, there was no need for this information in everyFocusAction
.composeOptics
method inGeneratorLoop
now has a case for every combination of Lens, Optional, Prism and Iso.some
a bit better.