Focal.Json
0.10.0
dotnet add package Focal.Json --version 0.10.0
NuGet\Install-Package Focal.Json -Version 0.10.0
<PackageReference Include="Focal.Json" Version="0.10.0" />
paket add Focal.Json --version 0.10.0
#r "nuget: Focal.Json, 0.10.0"
// Install Focal.Json as a Cake Addin #addin nuget:?package=Focal.Json&version=0.10.0 // Install Focal.Json as a Cake Tool #tool nuget:?package=Focal.Json&version=0.10.0
Focal
Lenses/Prisms/Traversals/etc. with an emphasis on usability in the F# programming environment
classDiagram
`IFold<'s,'a>` <|-- `IGetter<'s,'a>`
`ISetter<'s,'t,'a,'b>` <|-- `ITraversal<'s,'t,'a,'b>`
`IFold<'s,'a>` <|-- `ITraversal<'s,'t,'a,'b>`
`ITraversal<'s,'t,'a,'b>` <|-- `ILens<'s,'t,'a,'b>`
`IGetter<'s,'a>` <|-- `ILens<'s,'t,'a,'b>`
`ITraversal<'s,'t,'a,'b>` <|-- `IPrism<'s,'t,'a,'b>`
class `IFold<'s,'a>` {
ToSeq: ('s) -> seq<'a>
ComposeWith: (IFold<'a,'b>) -> IFold<'s,'b>
}
class `ISetter<'s,'t,'a,'b>` {
Over: ('a -> 'b) -> 's -> 't
ComposeWith: (ISetter<'a,'b,'c,'d>) -> ISetter<'s,'t,'c,'d>
}
class `IGetter<'s,'a>` {
Get: ('s) -> 'a
ComposeWith: (IGetter<'a,'b>) -> IGetter<'s,'b>
}
class `ITraversal<'s,'t,'a,'b>` {
ComposeWith: (ITraversal<'a,'b,'c,'d>) -> ITraversal<'s,'t,'c,'d>
}
class `ILens<'s,'t,'a,'b>` {
ComposeWith: (ILens<'a,'b,'c,'d>) -> ILens<'s,'t,'c,'d>
}
class `IPrism<'s,'t,'a,'b>` {
Which: ('s) -> Result<'a,'t>
Unto: ('b) -> 't
ComposeWith: (IPrism<'a,'b,'c,'d>) -> IPrism<'s,'t,'c,'d>
}
Design Goals
The purpose of this project is to create an optics library that fits as well as possible into idiomatic F# code. This is largely accomplished by a combination of an explicitly defined interface hierarchy for the main optics types, and complimented by extension methods to allow for composing optics using a Fluent-like interface. The instances of said interfaces are implemented as records of matching fuctions. This is a large departure from the lens or optics libraries in Haskell. In exchange for a reduced level of expressiveness, we are able to make heavy use of the auto-complete features available for F# in VSCode and Visual Studio.
Examples
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Focal.Core (>= 0.10.0)
- FSharp.Core (>= 8.0.200)
- FSharp.Data (>= 6.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.