[Home] Module Microsoft.FSharp.Math.Types.Associations


Associations are a systematic method of associating dictionaries of operations with given types at runtime. The logic and rules of association are similar in spirit to Haskell's type classes, except that everything happens at runtime, and thus the existence of appropriate associations (instances) is not checked at compile-time, and the association requirements of various functions are not recorded in their signatures. Runtime associations have some benefits over Haskell type classes (runtime resolutions can be performed to resolve potential ambiguities). In this release the system of associations is weak and simply limited to a registry of types that support dictionaries of numeric operations. Functional dependencies, overlapping instances etc. are not reported.

Values

ValueDescription
val getNumericAssociation : 'a typ -> INumeric<'a> option
Attempt to determine a numeric association for the given type, i.e. a registered dictionary of numeric operations. The interface can be queried dynamically for additional functionality in the numerics hierarchy.
val registerNumericAssociation : 'a typ -> #INumeric<'a> -> unit
Record an AppDomain-wide association between the given type and the given dictionary of numeric operations. Raise an error if an existing association already exists.

See Also

Microsoft.FSharp.Math.Types


Documentation for assembly fslib, version 1.1.10.1, generated using F# version 1.1.10.1