Header menu logo FSharp.Data

InferedType Type

 Represents inferred structural type. A type may be either primitive type
 (one of those listed by `primitiveTypes`) or it can be collection,
 (named) record and heterogeneous type. We also have `Null` type (which is
 a subtype of all non-primitive types) and universal `Top` type.

  * For collection, we infer the types of different things that appear in
    the collection and how many times they do.

  * A heterogeneous type (sum type) is simply a choice containing one
    of multiple different possibilities

 Why is collection not simply a list of Heterogeneous types? If we used that
 we would lose information about multiplicity and so we would not be able
 to generate nicer types!

Union cases

Union case Description

Collection(order, types)

Full Usage: Collection(order, types)

Parameters:
order : InferedTypeTag list
types : Map<InferedTypeTag, (InferedMultiplicity * InferedType)>

Heterogeneous(types, containsOptional)

Full Usage: Heterogeneous(types, containsOptional)

Parameters:
types : Map<InferedTypeTag, InferedType>
containsOptional : bool

Json(typ, optional)

Full Usage: Json(typ, optional)

Parameters:
typ : InferedType
optional : bool

Null

Full Usage: Null

Primitive(typ, unit, optional, shouldOverrideOnMerge)

Full Usage: Primitive(typ, unit, optional, shouldOverrideOnMerge)

Parameters:
    typ : Type
    unit : Type option
    optional : bool
    shouldOverrideOnMerge : bool

typ : Type
unit : Type option
optional : bool
shouldOverrideOnMerge : bool

Record(name, fields, optional)

Full Usage: Record(name, fields, optional)

Parameters:
name : string option
fields : InferedProperty list
optional : bool

Top

Full Usage: Top

Instance members

Instance member Description

this.DropOptionality

Full Usage: this.DropOptionality

Returns: InferedType
Returns: InferedType

this.EnsuresHandlesMissingValues

Full Usage: this.EnsuresHandlesMissingValues

Parameters:
    allowEmptyValues : bool

Returns: InferedType

When allowEmptyValues is true, we allow "" and double.NaN, otherwise we make the type optional and use None instead. It's currently only true in CsvProvider when PreferOptionals is set to false

allowEmptyValues : bool
Returns: InferedType

this.GetDropOptionality

Full Usage: this.GetDropOptionality

Returns: InferedType * bool
Returns: InferedType * bool

this.IsOptional

Full Usage: this.IsOptional

Returns: bool
Returns: bool

Static members

Static member Description

InferedType.CanHaveEmptyValues(typ)

Full Usage: InferedType.CanHaveEmptyValues(typ)

Parameters:
Returns: bool
typ : Type
Returns: bool

Type something to start searching.