Informedica.Utils.Lib.Optics Namespace
| Type/Module | Description |
|
A total, bidirectional conversion between 'a and 'b. |
|
|
Composes a Lens with a Lens, a Prism or an Isomorphism. |
|
|
A lens focuses on a part 'b of a whole 'a that is always present. |
|
|
Holds the infix operators to compose a Lens with a Lens and a Prism with a Lens. The operators keep the long optic chains in ZForm.Lib/DoseRule.fs readable from left to right. They are plain functions, not inline, so unlike the Aether operators they cannot choose the composition by the kind of optic: >-> composes two lenses, >?> composes a prism with a lens, and the compiler rejects the wrong operator. The few places that compose a prism with a prism call Prism.composePrism directly. |
|
|
Gets and sets the value a Lens or a Prism focuses on. The Optic, Lens and Prism modules replace the parts of the Aether library this codebase used, because the inline dispatch of Aether across assemblies broke under .NET SDK 10.0.400. A Lens and a Prism here have the same tuple shape of a getter and a setter as in Aether, so the lens and prism values defined elsewhere need no change. A value whose name ends in an underscore, such as min_ or fst_, is a lens or a prism, a pair of a getter and a setter, not a plain accessor. Use a plain get or set function to reach a single field, and an optic only where it composes over several levels. |
|
|
Composes a Prism with a Lens, a Prism or an Isomorphism. |
|
|
A prism focuses on a part 'b of a whole 'a that may or may not be present. |
|
|
Holds the Lens onto the first element and the Lens onto the second element of a pair. The two lenses match fst_ and snd_ of the Aether library, because the dose rule optics in ZForm.Lib/DoseRule.fs compose onto them directly, as in DoseRange.NormWeight_ >-> fst_. |
GenPRES