Use via NuGET
Install-Package FSharpx.Core
Install-Package FSharpx.Http
Install-Package FSharpx.Observable
Install-Package FSharpx.Compatibility.OCaml
Install-Package FSharpx.TypeProviders
Install-Package FSharpx.TypeProviders.Graph
Install-Package FSharpx.TypeProviders.AppSettings
Install-Package FSharpx.TypeProviders.Excel
Install-Package FSharpx.TypeProviders.Math
Install-Package FSharpx.TypeProviders.Regex
Install-Package FSharpx.TypeProviders.Machine
Install-Package FSharpx.TypeProviders.Management
Install-Package FSharpx.TypeProviders.Xaml
FSharpx.Core
FSharpx.Core is a collection of general functional constructs extending F#. Its main target is F# but it aims to be compatible with all .NET languages wherever possible. FSharpx.Core provides:
- Several standard monads: State, Reader, Writer, Either, Continuation, Distribution
- Purely functional data structures: Queues, double-ended Queues, BottomUpMergeSort, RandomAccessList, Vector, RoseTree
- Validation applicative functor
- General functions like flip
- Additional functions around collections
- Functions to make C# - F# interop easier
- Async extensions, Reusable agents and Observable extensions
FSharpx.Http
A package containing asynchronous helpers and the Conneg HTTP programming model
FSharpx.TypeProviders
FSharpx provides some very interesting F# type providers. At the moment we have:
- FSharpx.TypeProviders.AppSettings - generates setters and getters for application settings files
- FSharpx.TypeProviders.Excel - provides strongly typed access to Excel spread sheets
- FSharpx.TypeProviders.Graph - includes type providers for state machines and graphs
- FSharpx.TypeProviders.Math - contains a type provider for vector data structures
- FSharpx.TypeProviders.Regex - allows to access regular expressions in a strongly typed manner
- FSharpx.TypeProviders.Machine - provides strongly typed access to the Registry and the file system
- FSharpx.TypeProviders.Management - provides strongly typed access to WMI
- FSharpx.TypeProviders.Xaml - a type provider for XAML files and enables the use of the Visual Studio WPF Designer from F#
All type providers work with .NET 4.0 and .NET 4.5 and F# 3.0.
Samples
RegEx
type PhoneRegex = Regex< @"(?<AreaCode>^\d{3})-(?<PhoneNumber>\d{3}-\d{4}$)">
PhoneRegex.IsMatch "425-123-2345"
|> should equal true
PhoneRegex().Match("425-123-2345").CompleteMatch.Value
|> should equal "425-123-2345"
PhoneRegex().Match("425-123-2345").PhoneNumber.Value
|> should equal "123-2345"
Management (WMI)
type LocalHost = FSharpx.TypeProviders.Management.WmiProvider<"localhost"> let ctxt = LocalHost.GetDataContext() let batteryInfo = [ for x in ctxt.Win32_Battery -> x.Name, x.BatteryRechargeTime ]
FSharpx.Observable
A small package containing helpers related to programming with observables
Building the project
Read the wiki page about Build