diff --git a/docs/reference/dependenttypes-cctor-3.html b/docs/reference/dependenttypes-cctor-3.html new file mode 100644 index 0000000..67bad1b --- /dev/null +++ b/docs/reference/dependenttypes-cctor-3.html @@ -0,0 +1,123 @@ + + + + + Cctor<'Config, 'T, 'T2> - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Cctor<'Config, 'T, 'T2>

+

+ Namespace: DependentTypes
+

+
+

Constructor / validator type for DependentType 'T1 -> 'T2 style dependent types

+ +
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config, vfn) + +
+ Signature: (config:'Config * vfn:('Config -> 'T -> Option<'T2>)) -> Cctor<'Config,'T,'T2>
+
+
+ + + + + +

CompiledName: .ctor

+
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + TryCreate(x) + +
+ Signature: x:'T -> Option<'T2>
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/dependenttypes-dependenttype-4.html b/docs/reference/dependenttypes-dependenttype-4.html new file mode 100644 index 0000000..11f5600 --- /dev/null +++ b/docs/reference/dependenttypes-dependenttype-4.html @@ -0,0 +1,257 @@ + + + + + DependentType<'Cctor, 'Config, 'T, 'T2> - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

DependentType<'Cctor, 'Config, 'T, 'T2>

+

+ Namespace: DependentTypes
+

+
+

'T1 -> 'T2 style dependent type

+ +
+

Union Cases

+ + + + + + + + + + +
Union CaseDescription
+ + + DependentType('T2) + +
+ Signature: 'T2
+
+
+ + + + + +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: 'T2
+
+
+ + + + + +

CompiledName: get_Value

+
+

Static members

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Static memberDescription
+ + + ConvertTo(x) + +
+ Signature: x:DependentType<'x,'y,'q,^r> -> Option<DependentType<'a,'b,^r,'s>>
+ Type parameters: 'a, 'b, 's
+
+ + + + + +
+ + + Create(xs) + +
+ Signature: (xs:'T list) -> DependentType<'Cctor,'Config,'T,'T2> list
+
+
+ + + + + +
+ + + Create(xs) + +
+ Signature: xs:seq<'T> -> seq<DependentType<'Cctor,'Config,'T,'T2>>
+
+
+ + + + + +
+ + + Create(x) + +
+ Signature: x:'T -> DependentType<'Cctor,'Config,'T,'T2>
+
+
+ + + + + +
+ + + Extract(x) + +
+ Signature: x:DependentType<'Cctor,'Config,'T,'T2> -> 'T2
+
+
+ + + + + +
+ + + TryCreate(x) + +
+ Signature: (x:'T option) -> Option<DependentType<'Cctor,'Config,'T,'T2>>
+
+
+ + + + + +
+ + + TryCreate(x) + +
+ Signature: x:'T -> Option<DependentType<'Cctor,'Config,'T,'T2>>
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/dependenttypes-dependenttypes.html b/docs/reference/dependenttypes-dependenttypes.html new file mode 100644 index 0000000..9546a1f --- /dev/null +++ b/docs/reference/dependenttypes-dependenttypes.html @@ -0,0 +1,135 @@ + + + + + DependentTypes - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

DependentTypes

+

+ Namespace: DependentTypes
+

+
+

Inline helper functions.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + + convertTo x + +
+ Signature: x:^S -> Option<^T>
+ Type parameters: ^S, ^T
+
+ + + + + +
+ + + extract x + +
+ Signature: x:^S -> ^T
+ Type parameters: ^S, ^T
+
+ + + + + +
+ + + mkDependentType x + +
+ Signature: x:^S -> Option<^T>
+ Type parameters: ^S, ^T
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/dependenttypes-limitedvalue-3.html b/docs/reference/dependenttypes-limitedvalue-3.html new file mode 100644 index 0000000..46abe5d --- /dev/null +++ b/docs/reference/dependenttypes-limitedvalue-3.html @@ -0,0 +1,239 @@ + + + + + LimitedValue<'Validator, 'Config, 'T> - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

LimitedValue<'Validator, 'Config, 'T>

+

+ Namespace: DependentTypes
+

+
+

'T1 -> 'T1 style dependent type

+ +
+

Union Cases

+ + + + + + + + + + +
Union CaseDescription
+ + + DependentType('T) + +
+ Signature: 'T
+
+
+ + + + + +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: 'T
+
+
+ + + + + +

CompiledName: get_Value

+
+

Static members

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Static memberDescription
+ + + ConvertTo(x) + +
+ Signature: x:LimitedValue<'x,'y,^q> -> Option<LimitedValue<'a,'b,^q>>
+ Type parameters: 'a, 'b
+
+ + + + + +
+ + + Create(xs) + +
+ Signature: (xs:'T list) -> LimitedValue<'Validator,'Config,'T> list
+
+
+ + + + + +
+ + + Create(xs) + +
+ Signature: xs:seq<'T> -> seq<LimitedValue<'Validator,'Config,'T>>
+
+
+ + + + + +
+ + + Create(x) + +
+ Signature: x:'T -> LimitedValue<'Validator,'Config,'T>
+
+
+ + + + + +
+ + + Extract(x) + +
+ Signature: x:LimitedValue<'Validator,'Config,'T> -> 'T
+
+
+ + + + + +
+ + + TryCreate(x) + +
+ Signature: x:'T -> Option<LimitedValue<'Validator,'Config,'T>>
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/dependenttypes-validator-2.html b/docs/reference/dependenttypes-validator-2.html new file mode 100644 index 0000000..520f73a --- /dev/null +++ b/docs/reference/dependenttypes-validator-2.html @@ -0,0 +1,123 @@ + + + + + Validator<'Config, 'T> - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Validator<'Config, 'T>

+

+ Namespace: DependentTypes
+

+
+

Constructor / validator type for LimitedValue 'T1 -> 'T1 style dependent types

+ +
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config, vfn) + +
+ Signature: (config:'Config * vfn:('Config -> 'T -> Option<'T>)) -> Validator<'Config,'T>
+
+
+ + + + + +

CompiledName: .ctor

+
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Validate(x) + +
+ Signature: x:'T -> Option<'T>
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-digits.html b/docs/reference/domainlib-digits.html new file mode 100644 index 0000000..90b377a --- /dev/null +++ b/docs/reference/domainlib-digits.html @@ -0,0 +1,97 @@ + + + + + Digits - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Digits

+

+ Namespace: DomainLib
+

+
+

String of digit characters [0-9].

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-digits2.html b/docs/reference/domainlib-digits2.html new file mode 100644 index 0000000..87b8f39 --- /dev/null +++ b/docs/reference/domainlib-digits2.html @@ -0,0 +1,97 @@ + + + + + Digits2 - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Digits2

+

+ Namespace: DomainLib
+

+
+

String of digit characters [0-9] and length 2.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-digits3.html b/docs/reference/domainlib-digits3.html new file mode 100644 index 0000000..b9c756b --- /dev/null +++ b/docs/reference/domainlib-digits3.html @@ -0,0 +1,97 @@ + + + + + Digits3 - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Digits3

+

+ Namespace: DomainLib
+

+
+

String of digit characters [0-9] and length 3.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-digits4.html b/docs/reference/domainlib-digits4.html new file mode 100644 index 0000000..f2a3779 --- /dev/null +++ b/docs/reference/domainlib-digits4.html @@ -0,0 +1,97 @@ + + + + + Digits4 - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

Digits4

+

+ Namespace: DomainLib
+

+
+

String of digit characters [0-9] and length 4.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-digitsdef-digitsvalidator.html b/docs/reference/domainlib-digitsdef-digitsvalidator.html new file mode 100644 index 0000000..d453f1f --- /dev/null +++ b/docs/reference/domainlib-digitsdef-digitsvalidator.html @@ -0,0 +1,96 @@ + + + + + DigitsValidator - DependentTypes + + + + + + + + + + + + + + + +
+
+ +

DependentTypes

+
+
+
+
+ + + + +

DigitsValidator

+

+ Namespace: DomainLib
+ Parent Module: DigitsDef +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config) + +
+ Signature: config:int -> DigitsValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits.html b/docs/reference/domainlib-digitsdef-validdigits.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-digitsdef-validdigits.html rename to docs/reference/domainlib-digitsdef-validdigits.html index 2d139c7..31a8523 100644 --- a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits.html +++ b/docs/reference/domainlib-digitsdef-validdigits.html @@ -37,8 +37,8 @@

DependentTypes

ValidDigits

- Namespace: Jackfoxy.DomainLib
- Parent Module: DigitsDef + Namespace: DomainLib
+ Parent Module: DigitsDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidDigits
diff --git a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits2.html b/docs/reference/domainlib-digitsdef-validdigits2.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-digitsdef-validdigits2.html rename to docs/reference/domainlib-digitsdef-validdigits2.html index 19e473f..eff6b32 100644 --- a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits2.html +++ b/docs/reference/domainlib-digitsdef-validdigits2.html @@ -37,8 +37,8 @@

DependentTypes

ValidDigits2

- Namespace: Jackfoxy.DomainLib
- Parent Module: DigitsDef + Namespace: DomainLib
+ Parent Module: DigitsDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidDigits2
diff --git a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits3.html b/docs/reference/domainlib-digitsdef-validdigits3.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-digitsdef-validdigits3.html rename to docs/reference/domainlib-digitsdef-validdigits3.html index 9b5de10..000b8e1 100644 --- a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits3.html +++ b/docs/reference/domainlib-digitsdef-validdigits3.html @@ -37,8 +37,8 @@

DependentTypes

ValidDigits3

- Namespace: Jackfoxy.DomainLib
- Parent Module: DigitsDef + Namespace: DomainLib
+ Parent Module: DigitsDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidDigits3
diff --git a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits4.html b/docs/reference/domainlib-digitsdef-validdigits4.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-digitsdef-validdigits4.html rename to docs/reference/domainlib-digitsdef-validdigits4.html index 591853e..7ea0580 100644 --- a/docs/reference/jackfoxy-domainlib-digitsdef-validdigits4.html +++ b/docs/reference/domainlib-digitsdef-validdigits4.html @@ -37,8 +37,8 @@

DependentTypes

ValidDigits4

- Namespace: Jackfoxy.DomainLib
- Parent Module: DigitsDef + Namespace: DomainLib
+ Parent Module: DigitsDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidDigits4
diff --git a/docs/reference/jackfoxy-domainlib-intrange.html b/docs/reference/domainlib-digitsdef.html similarity index 87% rename from docs/reference/jackfoxy-domainlib-intrange.html rename to docs/reference/domainlib-digitsdef.html index 0b26a10..4fb1280 100644 --- a/docs/reference/jackfoxy-domainlib-intrange.html +++ b/docs/reference/domainlib-digitsdef.html @@ -2,7 +2,7 @@ - IntRange - DependentTypes + DigitsDef - DependentTypes @@ -35,9 +35,9 @@

DependentTypes

-

IntRange

+

DigitsDef

- Namespace: Jackfoxy.DomainLib
+ Namespace: DomainLib

@@ -52,31 +52,31 @@

Nested types and modules

- MaxMinus101 + DigitsValidator - MaxPos100 + ValidDigits - MaxPos20000 + ValidDigits2 - Min101 + ValidDigits3 - RangeMinus100To100 + ValidDigits4 diff --git a/docs/reference/domainlib-gt100.html b/docs/reference/domainlib-gt100.html new file mode 100644 index 0000000..b7ad5ac --- /dev/null +++ b/docs/reference/domainlib-gt100.html @@ -0,0 +1,97 @@ + + + + + GT100 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

GT100

+

+ Namespace: DomainLib
+

+
+

Integer greater than 100.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: int
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-intrange-maxminus101.html b/docs/reference/domainlib-intrange-maxminus101.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-intrange-maxminus101.html rename to docs/reference/domainlib-intrange-maxminus101.html index 1aa8430..8bd90cb 100644 --- a/docs/reference/jackfoxy-domainlib-intrange-maxminus101.html +++ b/docs/reference/domainlib-intrange-maxminus101.html @@ -37,8 +37,8 @@

DependentTypes

MaxMinus101

- Namespace: Jackfoxy.DomainLib
- Parent Module: IntRange + Namespace: DomainLib
+ Parent Module: IntRange

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> MaxMinus101
diff --git a/docs/reference/domainlib-intrange-maxnumrangevalidator.html b/docs/reference/domainlib-intrange-maxnumrangevalidator.html new file mode 100644 index 0000000..139fa62 --- /dev/null +++ b/docs/reference/domainlib-intrange-maxnumrangevalidator.html @@ -0,0 +1,96 @@ + + + + + MaxNumRangeValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

MaxNumRangeValidator

+

+ Namespace: DomainLib
+ Parent Module: IntRange +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config) + +
+ Signature: config:int -> MaxNumRangeValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-intrange-maxpos100.html b/docs/reference/domainlib-intrange-maxpos100.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-intrange-maxpos100.html rename to docs/reference/domainlib-intrange-maxpos100.html index 9205637..882a1b7 100644 --- a/docs/reference/jackfoxy-domainlib-intrange-maxpos100.html +++ b/docs/reference/domainlib-intrange-maxpos100.html @@ -37,8 +37,8 @@

DependentTypes

MaxPos100

- Namespace: Jackfoxy.DomainLib
- Parent Module: IntRange + Namespace: DomainLib
+ Parent Module: IntRange

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> MaxPos100
diff --git a/docs/reference/jackfoxy-domainlib-intrange-maxpos20000.html b/docs/reference/domainlib-intrange-maxpos20000.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-intrange-maxpos20000.html rename to docs/reference/domainlib-intrange-maxpos20000.html index 2b6a085..2ecf149 100644 --- a/docs/reference/jackfoxy-domainlib-intrange-maxpos20000.html +++ b/docs/reference/domainlib-intrange-maxpos20000.html @@ -37,8 +37,8 @@

DependentTypes

MaxPos20000

- Namespace: Jackfoxy.DomainLib
- Parent Module: IntRange + Namespace: DomainLib
+ Parent Module: IntRange

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> MaxPos20000
diff --git a/docs/reference/jackfoxy-domainlib-intrange-min101.html b/docs/reference/domainlib-intrange-min101.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-intrange-min101.html rename to docs/reference/domainlib-intrange-min101.html index da070da..5f318ab 100644 --- a/docs/reference/jackfoxy-domainlib-intrange-min101.html +++ b/docs/reference/domainlib-intrange-min101.html @@ -37,8 +37,8 @@

DependentTypes

Min101

- Namespace: Jackfoxy.DomainLib
- Parent Module: IntRange + Namespace: DomainLib
+ Parent Module: IntRange

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> Min101
diff --git a/docs/reference/domainlib-intrange-minnumrangevalidator.html b/docs/reference/domainlib-intrange-minnumrangevalidator.html new file mode 100644 index 0000000..12ef499 --- /dev/null +++ b/docs/reference/domainlib-intrange-minnumrangevalidator.html @@ -0,0 +1,96 @@ + + + + + MinNumRangeValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

MinNumRangeValidator

+

+ Namespace: DomainLib
+ Parent Module: IntRange +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config) + +
+ Signature: config:int -> MinNumRangeValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-intrange-numrangevalidator.html b/docs/reference/domainlib-intrange-numrangevalidator.html new file mode 100644 index 0000000..70191bf --- /dev/null +++ b/docs/reference/domainlib-intrange-numrangevalidator.html @@ -0,0 +1,96 @@ + + + + + NumRangeValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

NumRangeValidator

+

+ Namespace: DomainLib
+ Parent Module: IntRange +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config) + +
+ Signature: (config:(int * int)) -> NumRangeValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-intrange-rangeminus100to100.html b/docs/reference/domainlib-intrange-rangeminus100to100.html similarity index 93% rename from docs/reference/jackfoxy-domainlib-intrange-rangeminus100to100.html rename to docs/reference/domainlib-intrange-rangeminus100to100.html index b3230ec..0c62c70 100644 --- a/docs/reference/jackfoxy-domainlib-intrange-rangeminus100to100.html +++ b/docs/reference/domainlib-intrange-rangeminus100to100.html @@ -37,8 +37,8 @@

DependentTypes

RangeMinus100To100

- Namespace: Jackfoxy.DomainLib
- Parent Module: IntRange + Namespace: DomainLib
+ Parent Module: IntRange

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> RangeMinus100To100
diff --git a/docs/reference/domainlib-intrange.html b/docs/reference/domainlib-intrange.html new file mode 100644 index 0000000..7c1d8ed --- /dev/null +++ b/docs/reference/domainlib-intrange.html @@ -0,0 +1,130 @@ + + + + + IntRange - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

IntRange

+

+ Namespace: DomainLib
+

+
+
+ + +

Nested types and modules

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ MaxMinus101 +
+ MaxNumRangeValidator +
+ MaxPos100 +
+ MaxPos20000 +
+ Min101 +
+ MinNumRangeValidator +
+ NumRangeValidator +
+ RangeMinus100To100 +
+ +
+ + +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-ltminus100.html b/docs/reference/domainlib-ltminus100.html new file mode 100644 index 0000000..11d8df4 --- /dev/null +++ b/docs/reference/domainlib-ltminus100.html @@ -0,0 +1,97 @@ + + + + + LTminus100 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

LTminus100

+

+ Namespace: DomainLib
+

+
+

Integer less than -100.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: int
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-minus100to100.html b/docs/reference/domainlib-minus100to100.html new file mode 100644 index 0000000..c5e52df --- /dev/null +++ b/docs/reference/domainlib-minus100to100.html @@ -0,0 +1,97 @@ + + + + + Minus100To100 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

Minus100To100

+

+ Namespace: DomainLib
+

+
+

Integer in range -100 to 100.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: int
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-nonemptyset-1.html b/docs/reference/domainlib-nonemptyset-1.html new file mode 100644 index 0000000..17aa78d --- /dev/null +++ b/docs/reference/domainlib-nonemptyset-1.html @@ -0,0 +1,97 @@ + + + + + NonEmptySet<'T> - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

NonEmptySet<'T>

+

+ Namespace: DomainLib
+

+
+

Generic non-empty Set<'T>

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: Set<'T>
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-nonemptysetdef-nonemptysetvalidator-1.html b/docs/reference/domainlib-nonemptysetdef-nonemptysetvalidator-1.html new file mode 100644 index 0000000..8512c81 --- /dev/null +++ b/docs/reference/domainlib-nonemptysetdef-nonemptysetvalidator-1.html @@ -0,0 +1,96 @@ + + + + + NonEmptySetValidator<'T> - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

NonEmptySetValidator<'T>

+

+ Namespace: DomainLib
+ Parent Module: NonEmptySetDef +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new() + +
+ Signature: unit -> NonEmptySetValidator<'T>
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-nonemptysetdef-validnonemptyset-1.html b/docs/reference/domainlib-nonemptysetdef-validnonemptyset-1.html similarity index 92% rename from docs/reference/jackfoxy-domainlib-nonemptysetdef-validnonemptyset-1.html rename to docs/reference/domainlib-nonemptysetdef-validnonemptyset-1.html index 91fd26b..d78d164 100644 --- a/docs/reference/jackfoxy-domainlib-nonemptysetdef-validnonemptyset-1.html +++ b/docs/reference/domainlib-nonemptysetdef-validnonemptyset-1.html @@ -37,8 +37,8 @@

DependentTypes

ValidNonEmptySet<'T>

- Namespace: Jackfoxy.DomainLib
- Parent Module: NonEmptySetDef + Namespace: DomainLib
+ Parent Module: NonEmptySetDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidNonEmptySet<'T>
diff --git a/docs/reference/jackfoxy-domainlib-upperlatindef.html b/docs/reference/domainlib-nonemptysetdef.html similarity index 91% rename from docs/reference/jackfoxy-domainlib-upperlatindef.html rename to docs/reference/domainlib-nonemptysetdef.html index 3d4676d..d000338 100644 --- a/docs/reference/jackfoxy-domainlib-upperlatindef.html +++ b/docs/reference/domainlib-nonemptysetdef.html @@ -2,7 +2,7 @@ - UpperLatinDef - DependentTypes + NonEmptySetDef - DependentTypes @@ -35,9 +35,9 @@

DependentTypes

-

UpperLatinDef

+

NonEmptySetDef

- Namespace: Jackfoxy.DomainLib
+ Namespace: DomainLib

@@ -52,13 +52,13 @@

Nested types and modules

- ValidUpperLatin2 + NonEmptySetValidator<'T> - ValidUpperLatin3 + ValidNonEmptySet<'T> diff --git a/docs/reference/domainlib-positiveint100.html b/docs/reference/domainlib-positiveint100.html new file mode 100644 index 0000000..384757d --- /dev/null +++ b/docs/reference/domainlib-positiveint100.html @@ -0,0 +1,97 @@ + + + + + PositiveInt100 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

PositiveInt100

+

+ Namespace: DomainLib
+

+
+

Integer in range 0 to 100.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: int
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-positiveint20000.html b/docs/reference/domainlib-positiveint20000.html new file mode 100644 index 0000000..657df0d --- /dev/null +++ b/docs/reference/domainlib-positiveint20000.html @@ -0,0 +1,97 @@ + + + + + PositiveInt20000 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

PositiveInt20000

+

+ Namespace: DomainLib
+

+
+

Integer in range 0 to 20000.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: int
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-trimnonemptystring.html b/docs/reference/domainlib-trimnonemptystring.html new file mode 100644 index 0000000..7e82c84 --- /dev/null +++ b/docs/reference/domainlib-trimnonemptystring.html @@ -0,0 +1,97 @@ + + + + + TrimNonEmptyString - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

TrimNonEmptyString

+

+ Namespace: DomainLib
+

+
+

Trimmed, non-empty, non-null string

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-trimnonemptystringdef-nonempty.html b/docs/reference/domainlib-trimnonemptystringdef-nonempty.html similarity index 92% rename from docs/reference/jackfoxy-domainlib-trimnonemptystringdef-nonempty.html rename to docs/reference/domainlib-trimnonemptystringdef-nonempty.html index 882b024..9238ef7 100644 --- a/docs/reference/jackfoxy-domainlib-trimnonemptystringdef-nonempty.html +++ b/docs/reference/domainlib-trimnonemptystringdef-nonempty.html @@ -37,8 +37,8 @@

DependentTypes

NonEmpty

- Namespace: Jackfoxy.DomainLib
- Parent Module: TrimNonEmptyStringDef + Namespace: DomainLib
+ Parent Module: TrimNonEmptyStringDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> NonEmpty
diff --git a/docs/reference/domainlib-trimnonemptystringdef-nonemptyvalidator.html b/docs/reference/domainlib-trimnonemptystringdef-nonemptyvalidator.html new file mode 100644 index 0000000..ebc8d3e --- /dev/null +++ b/docs/reference/domainlib-trimnonemptystringdef-nonemptyvalidator.html @@ -0,0 +1,96 @@ + + + + + NonEmptyValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

NonEmptyValidator

+

+ Namespace: DomainLib
+ Parent Module: TrimNonEmptyStringDef +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new() + +
+ Signature: unit -> NonEmptyValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-trimnonemptystringdef.html b/docs/reference/domainlib-trimnonemptystringdef.html similarity index 90% rename from docs/reference/jackfoxy-domainlib-trimnonemptystringdef.html rename to docs/reference/domainlib-trimnonemptystringdef.html index cc8d86c..bb7a872 100644 --- a/docs/reference/jackfoxy-domainlib-trimnonemptystringdef.html +++ b/docs/reference/domainlib-trimnonemptystringdef.html @@ -37,7 +37,7 @@

DependentTypes

TrimNonEmptyStringDef

- Namespace: Jackfoxy.DomainLib
+ Namespace: DomainLib

@@ -52,7 +52,13 @@

Nested types and modules

- NonEmpty + NonEmpty + + + + + + NonEmptyValidator diff --git a/docs/reference/domainlib-upperlatin2.html b/docs/reference/domainlib-upperlatin2.html new file mode 100644 index 0000000..e57f970 --- /dev/null +++ b/docs/reference/domainlib-upperlatin2.html @@ -0,0 +1,97 @@ + + + + + UpperLatin2 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

UpperLatin2

+

+ Namespace: DomainLib
+

+
+

Uppercase latin string of length 2.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-upperlatin3.html b/docs/reference/domainlib-upperlatin3.html new file mode 100644 index 0000000..6c10a5d --- /dev/null +++ b/docs/reference/domainlib-upperlatin3.html @@ -0,0 +1,97 @@ + + + + + UpperLatin3 - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

UpperLatin3

+

+ Namespace: DomainLib
+

+
+

Uppercase latin string of length 3.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: string
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-upperlatindef-upperlatinvalidator.html b/docs/reference/domainlib-upperlatindef-upperlatinvalidator.html new file mode 100644 index 0000000..8d39a79 --- /dev/null +++ b/docs/reference/domainlib-upperlatindef-upperlatinvalidator.html @@ -0,0 +1,96 @@ + + + + + UpperLatinValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

UpperLatinValidator

+

+ Namespace: DomainLib
+ Parent Module: UpperLatinDef +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new(config) + +
+ Signature: config:int -> UpperLatinValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin2.html b/docs/reference/domainlib-upperlatindef-validupperlatin2.html similarity index 92% rename from docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin2.html rename to docs/reference/domainlib-upperlatindef-validupperlatin2.html index ae3c7ce..ca0c2cd 100644 --- a/docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin2.html +++ b/docs/reference/domainlib-upperlatindef-validupperlatin2.html @@ -37,8 +37,8 @@

DependentTypes

ValidUpperLatin2

- Namespace: Jackfoxy.DomainLib
- Parent Module: UpperLatinDef + Namespace: DomainLib
+ Parent Module: UpperLatinDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidUpperLatin2
diff --git a/docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin3.html b/docs/reference/domainlib-upperlatindef-validupperlatin3.html similarity index 92% rename from docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin3.html rename to docs/reference/domainlib-upperlatindef-validupperlatin3.html index 4ffec58..7f67810 100644 --- a/docs/reference/jackfoxy-domainlib-upperlatindef-validupperlatin3.html +++ b/docs/reference/domainlib-upperlatindef-validupperlatin3.html @@ -37,8 +37,8 @@

DependentTypes

ValidUpperLatin3

- Namespace: Jackfoxy.DomainLib
- Parent Module: UpperLatinDef + Namespace: DomainLib
+ Parent Module: UpperLatinDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidUpperLatin3
diff --git a/docs/reference/jackfoxy-domainlib-digitsdef.html b/docs/reference/domainlib-upperlatindef.html similarity index 85% rename from docs/reference/jackfoxy-domainlib-digitsdef.html rename to docs/reference/domainlib-upperlatindef.html index cddcd7a..27aaf96 100644 --- a/docs/reference/jackfoxy-domainlib-digitsdef.html +++ b/docs/reference/domainlib-upperlatindef.html @@ -2,7 +2,7 @@ - DigitsDef - DependentTypes + UpperLatinDef - DependentTypes @@ -35,9 +35,9 @@

DependentTypes

-

DigitsDef

+

UpperLatinDef

- Namespace: Jackfoxy.DomainLib
+ Namespace: DomainLib

@@ -52,25 +52,19 @@

Nested types and modules

- ValidDigits + UpperLatinValidator - ValidDigits2 + ValidUpperLatin2 - ValidDigits3 - - - - - - ValidDigits4 + ValidUpperLatin3 diff --git a/docs/reference/domainlib-utcdatetime.html b/docs/reference/domainlib-utcdatetime.html new file mode 100644 index 0000000..08bc6c9 --- /dev/null +++ b/docs/reference/domainlib-utcdatetime.html @@ -0,0 +1,97 @@ + + + + + UtcDateTime - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

UtcDateTime

+

+ Namespace: DomainLib
+

+
+

DateTime set to UTC.

+ +
+

Instance members

+ + + + + + + + + + +
Instance memberDescription
+ + + Value + +
+ Signature: DateTime
+
+
+ + + + + +

CompiledName: get_Value

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/domainlib-utcdatetimedef-utcdatetimevalidator.html b/docs/reference/domainlib-utcdatetimedef-utcdatetimevalidator.html new file mode 100644 index 0000000..e016401 --- /dev/null +++ b/docs/reference/domainlib-utcdatetimedef-utcdatetimevalidator.html @@ -0,0 +1,96 @@ + + + + + UtcDateTimeValidator - DependentTypes + + + + + + + + + + + + + + + +
+ +
+
+
+ + + + +

UtcDateTimeValidator

+

+ Namespace: DomainLib
+ Parent Module: UtcDateTimeDef +

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + + new() + +
+ Signature: unit -> UtcDateTimeValidator
+
+
+ + + + + +

CompiledName: .ctor

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/docs/reference/jackfoxy-domainlib-utcdatetimedef-validutcdatetime.html b/docs/reference/domainlib-utcdatetimedef-validutcdatetime.html similarity index 92% rename from docs/reference/jackfoxy-domainlib-utcdatetimedef-validutcdatetime.html rename to docs/reference/domainlib-utcdatetimedef-validutcdatetime.html index 9b8d497..0b37b9e 100644 --- a/docs/reference/jackfoxy-domainlib-utcdatetimedef-validutcdatetime.html +++ b/docs/reference/domainlib-utcdatetimedef-validutcdatetime.html @@ -37,8 +37,8 @@

DependentTypes

ValidUtcDateTime

- Namespace: Jackfoxy.DomainLib
- Parent Module: UtcDateTimeDef + Namespace: DomainLib
+ Parent Module: UtcDateTimeDef

@@ -51,10 +51,10 @@

Constructors

- + new() -
+
Signature: unit -> ValidUtcDateTime
diff --git a/docs/reference/jackfoxy-domainlib-utcdatetimedef.html b/docs/reference/domainlib-utcdatetimedef.html similarity index 90% rename from docs/reference/jackfoxy-domainlib-utcdatetimedef.html rename to docs/reference/domainlib-utcdatetimedef.html index c930e75..9883fc9 100644 --- a/docs/reference/jackfoxy-domainlib-utcdatetimedef.html +++ b/docs/reference/domainlib-utcdatetimedef.html @@ -37,7 +37,7 @@

DependentTypes

UtcDateTimeDef

- Namespace: Jackfoxy.DomainLib
+ Namespace: DomainLib

@@ -52,7 +52,13 @@

Nested types and modules

- ValidUtcDateTime + UtcDateTimeValidator + + + + + + ValidUtcDateTime diff --git a/docs/reference/index.html b/docs/reference/index.html index 15c8f63..86ebdfd 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -36,46 +36,223 @@

DependentTypes

DependentTypes

-

Jackfoxy.DomainLib Namespace

+

DependentTypes Namespace

- +
+ + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ Cctor<'Config, 'T, 'T2> +

Constructor / validator type for DependentType 'T1 -> 'T2 style dependent types

+ +
+ DependentType<'Cctor, 'Config, 'T, 'T2> +

'T1 -> 'T2 style dependent type

+ +
+ LimitedValue<'Validator, 'Config, 'T> +

'T1 -> 'T1 style dependent type

+ +
+ Validator<'Config, 'T> +

Constructor / validator type for LimitedValue 'T1 -> 'T1 style dependent types

+ +
+ + + + + + + + + + +
ModuleDescription
+ DependentTypes +

Inline helper functions.

+ +
+ +
+

DomainLib Namespace

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
+ Digits +

String of digit characters [0-9].

+ +
+ Digits2 +

String of digit characters [0-9] and length 2.

+ +
+ Digits3 +

String of digit characters [0-9] and length 3.

+ +
+ Digits4 +

String of digit characters [0-9] and length 4.

+ +
+ GT100 +

Integer greater than 100.

+ +
+ LTminus100 +

Integer less than -100.

+ +
+ Minus100To100 +

Integer in range -100 to 100.

+ +
+ NonEmptySet<'T> +

Generic non-empty Set<'T>

+ +
+ PositiveInt100 +

Integer in range 0 to 100.

+ +
+ PositiveInt20000 +

Integer in range 0 to 20000.

+ +
+ TrimNonEmptyString +

Trimmed, non-empty, non-null string

+ +
+ UpperLatin2 +

Uppercase latin string of length 2.

+ +
+ UpperLatin3 +

Uppercase latin string of length 3.

+ +
+ UtcDateTime +

DateTime set to UTC.

+ +
+ diff --git a/docs/reference/jackfoxy-domainlib-nonemptysetdef.html b/docs/reference/jackfoxy-domainlib-nonemptysetdef.html deleted file mode 100644 index 05044c1..0000000 --- a/docs/reference/jackfoxy-domainlib-nonemptysetdef.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - NonEmptySetDef - DependentTypes - - - - - - - - - - - - - - - -
- -
-
-
- - - - -

NonEmptySetDef

-

- Namespace: Jackfoxy.DomainLib
-

-
-
- - -

Nested types and modules

-
-
ModuleDescription
- DigitsDef + DigitsDef
- IntRange + IntRange
- NonEmptySetDef + NonEmptySetDef
- TrimNonEmptyStringDef + TrimNonEmptyStringDef
- UpperLatinDef + UpperLatinDef
- UtcDateTimeDef + UtcDateTimeDef
- - - - - - - - - -
TypeDescription
- ValidNonEmptySet<'T> -
- -
- - -
-
- F# Project - -
-
-
- Fork me on GitHub - - diff --git a/docs/tutorial.html b/docs/tutorial.html index 571cdad..ce960dd 100644 --- a/docs/tutorial.html +++ b/docs/tutorial.html @@ -55,25 +55,23 @@

14: 15: 16: -17:
open DependentTypes
-open DependentTypes
-open System
+open System
 
 module TrimNonEmptyStringDef =
-    let verifyTrimNonEmptyString _ (value : string) =
-        if String.IsNullOrWhiteSpace value then
-            None        
+    let verifyTrimNonEmptyString _ (value : string) =
+        if String.IsNullOrWhiteSpace value then
+            None        
         else 
-            Some <| value.Trim()
+            Some <| value.Trim()
 
-    type NonEmptyValidator() = 
-        inherit Cctor<unit, string, string>((), verifyTrimNonEmptyString)
+    type NonEmptyValidator() = 
+        inherit Cctor<unit, string, string>((), verifyTrimNonEmptyString)
 
-    type NonEmpty () = inherit NonEmptyValidator()
+    type NonEmpty () = inherit NonEmptyValidator()
 
-type TrimNonEmptyString = DependentType<TrimNonEmptyStringDef.NonEmpty, unit, string, string> 
+type TrimNonEmptyString = DependentType<TrimNonEmptyStringDef.NonEmpty, unit, string, string> 
 
@@ -91,18 +89,18 @@

11: 12: -
let myGoodString = (TrimNonEmptyString.TryCreate "good string   ").Value
+
let myGoodString = (TrimNonEmptyString.TryCreate "good string   ").Value
 
-let notTrimNonEmptyString = TrimNonEmptyString.TryCreate "    "
+let notTrimNonEmptyString = TrimNonEmptyString.TryCreate "    "
 
 // DependentType "good string"
-printfn "%A" myGoodString
+printfn "%A" myGoodString
 
 // "good string"
-printfn "%s" myGoodString.Value
+printfn "%s" myGoodString.Value
 
 // true
-printfn "%b" notTrimNonEmptyString.IsNone
+printfn "%b" notTrimNonEmptyString.IsNone
 
@@ -122,17 +120,17 @@

12:

module UtcDateTimeDef =
-    let verifyUtcDateTime _ (value : DateTime) =
-        Some <| value.ToUniversalTime()     
+    let verifyUtcDateTime _ (value : DateTime) =
+        Some <| value.ToUniversalTime()     
 
-    type UtcDateTimeValidator() = 
-        inherit Cctor<unit, DateTime, DateTime>((), verifyUtcDateTime)
+    type UtcDateTimeValidator() = 
+        inherit Cctor<unit, DateTime, DateTime>((), verifyUtcDateTime)
 
-    type ValidUtcDateTime () = inherit UtcDateTimeValidator()
+    type ValidUtcDateTime () = inherit UtcDateTimeValidator()
     
-type UtcDateTime = DependentType<UtcDateTimeDef.ValidUtcDateTime, unit, DateTime, DateTime> 
+type UtcDateTime = DependentType<UtcDateTimeDef.ValidUtcDateTime, unit, DateTime, DateTime> 
 
-let utcTime = DateTime.Now |> UtcDateTime.Create
+let utcTime = DateTime.Now |> UtcDateTime.Create
 
@@ -154,20 +152,20 @@

13: 14: -
let validate normalize fn v =
-    if fn (normalize v) then Some (normalize v) else None
+
let validate normalize fn v =
+    if fn (normalize v) then Some (normalize v) else None
 
-let validateRange (min,max) v = validate id (fun v -> v >= min && v <= max) v
+let validateRange (min,max) v = validate id (fun v -> v >= min && v <= max) v
 
-type NumRangeValidator(config) = inherit Cctor<int * int, int, int>(config, validateRange)
+type NumRangeValidator(config) = inherit Cctor<int * int, int, int>(config, validateRange)
 
-type MaxPos100 () = inherit NumRangeValidator(0, 100)
+type MaxPos100 () = inherit NumRangeValidator(0, 100)
 
-type PositiveInt100 = DependentType<MaxPos100, int * int, int, int>
+type PositiveInt100 = DependentType<MaxPos100, int * int, int, int>
 
-let a : PositiveInt100 option = mkDependentType 100
+let a : PositiveInt100 option = mkDependentType 100
 
-let b = PositiveInt100.TryCreate 100
+let b = PositiveInt100.TryCreate 100
 
@@ -183,14 +181,14 @@

7: 8:

-
let a' = a.Value |> extract
-let b' = b.Value.Value
+
let a' = a.Value |> extract
+let b' = b.Value.Value
 
 // 100
-printfn "%i" a'
+printfn "%i" a'
 
 // "100"
-printfn "%s" <| b.ToString()
+printfn "%s" <| b.ToString()
 
@@ -204,13 +202,13 @@

6: 7:

-
type MaxPos200 () = inherit NumRangeValidator(0, 200)
+
type MaxPos200 () = inherit NumRangeValidator(0, 200)
 
-type PositiveInt200 = DependentType<MaxPos100, int * int, int, int>
+type PositiveInt200 = DependentType<MaxPos100, int * int, int, int>
 
-let valToString5 : Option<PositiveInt200> = convertTo a.Value
+let valToString5 : Option<PositiveInt200> = convertTo a.Value
 
-printfn "PositiveInt100 converted to PositiveInt200: %A of type %A" valToString5.Value <| valToString5.GetType()
+printfn "PositiveInt100 converted to PositiveInt200: %A of type %A" valToString5.Value <| valToString5.GetType()
 
@@ -234,21 +232,21 @@

16:

module NonEmptySetDef =
-    let verifyNonEmptySet _ (value : Set<'T>) =
-        if value.Count > 0 then
-            Some value  
+    let verifyNonEmptySet _ (value : Set<'T>) =
+        if value.Count > 0 then
+            Some value  
         else
-            None
+            None
 
-    type NonEmptySetValidator<'T when 'T : comparison>() = 
-        inherit Cctor<unit, Set<'T>, Set<'T>>((), verifyNonEmptySet)
+    type NonEmptySetValidator<'T when 'T : comparison>() = 
+        inherit Cctor<unit, Set<'T>, Set<'T>>((), verifyNonEmptySet)
 
-    type ValidNonEmptySet<'T when 'T : comparison>() = inherit NonEmptySetValidator<'T>()
+    type ValidNonEmptySet<'T when 'T : comparison>() = inherit NonEmptySetValidator<'T>()
     
-type NonEmptySet<'T  when 'T : comparison> = DependentType<NonEmptySetDef.ValidNonEmptySet<'T>, unit, Set<'T>, Set<'T>>
+type NonEmptySet<'T  when 'T : comparison> = DependentType<NonEmptySetDef.ValidNonEmptySet<'T>, unit, Set<'T>, Set<'T>>
 
-let myNonEmptyIntSet = [1;2;3] |> Set.ofList |> NonEmptySet.Create
-let myNonEmptyStringSet = ["Rob";"Jack";"Don"] |> Set.ofList |> NonEmptySet.Create
+let myNonEmptyIntSet = [1;2;3] |> Set.ofList |> NonEmptySet.Create
+let myNonEmptyStringSet = ["Rob";"Jack";"Don"] |> Set.ofList |> NonEmptySet.Create
 
@@ -279,28 +277,28 @@

23:
module IntRange =
-    let validate fn v =
-        if fn v then Some v else None
-    let validateRange (min,max) v = validate (fun v -> v >= min && v <= max) v
-    let validateMin (min) v = validate (fun v -> v >= min) v
-    let validateMax (max) v = validate (fun v -> v <= max) v
-
-    type NumRangeValidator(config) = inherit Validator<int * int, int>(config, validateRange)
-    type MinNumRangeValidator(config) = inherit Validator<int, int>(config, validateMin)
-    type MaxNumRangeValidator(config) = inherit Validator<int, int>(config, validateMax)
-
-    type MaxPos150 () = inherit NumRangeValidator(0, 150)
-    type MaxPos20000 () = inherit NumRangeValidator(0, 20000)
-    type RangeMinus100To100 () = inherit NumRangeValidator(-100, 100)
-    type Min101 () = inherit MinNumRangeValidator(101)
-    type MaxMinus101 () = inherit MaxNumRangeValidator(-101)
-
-type PositiveInt150 = LimitedValue<IntRange.MaxPos150, int * int, int>
-type PositiveInt20000 = LimitedValue<IntRange.MaxPos20000, int * int, int>
-type Minus100To100 = LimitedValue<IntRange.RangeMinus100To100, int * int, int>
-
-type GT100 = LimitedValue<IntRange.Min101, int, int>
-type LTminus100 = LimitedValue<IntRange.MaxMinus101, int, int>
+    let validate fn v =
+        if fn v then Some v else None
+    let validateRange (min,max) v = validate (fun v -> v >= min && v <= max) v
+    let validateMin (min) v = validate (fun v -> v >= min) v
+    let validateMax (max) v = validate (fun v -> v <= max) v
+
+    type NumRangeValidator(config) = inherit Validator<int * int, int>(config, validateRange)
+    type MinNumRangeValidator(config) = inherit Validator<int, int>(config, validateMin)
+    type MaxNumRangeValidator(config) = inherit Validator<int, int>(config, validateMax)
+
+    type MaxPos150 () = inherit NumRangeValidator(0, 150)
+    type MaxPos20000 () = inherit NumRangeValidator(0, 20000)
+    type RangeMinus100To100 () = inherit NumRangeValidator(-100, 100)
+    type Min101 () = inherit MinNumRangeValidator(101)
+    type MaxMinus101 () = inherit MaxNumRangeValidator(-101)
+
+type PositiveInt150 = LimitedValue<IntRange.MaxPos150, int * int, int>
+type PositiveInt20000 = LimitedValue<IntRange.MaxPos20000, int * int, int>
+type Minus100To100 = LimitedValue<IntRange.RangeMinus100To100, int * int, int>
+
+type GT100 = LimitedValue<IntRange.Min101, int, int>
+type LTminus100 = LimitedValue<IntRange.MaxMinus101, int, int>
 
@@ -318,15 +316,15 @@

8: 9: -
let aa = Some " this string " |> TrimNonEmptyString.TryCreate
+
let aa = Some " this string " |> TrimNonEmptyString.TryCreate
 
-let bb = "this string " |> TrimNonEmptyString.TryCreate
+let bb = "this string " |> TrimNonEmptyString.TryCreate
 
-let cc = "this string " |> TrimNonEmptyString.Create
+let cc = "this string " |> TrimNonEmptyString.Create
 
-let dd = [" this string "; "that string"; "the other string "] |> TrimNonEmptyString.Create
+let dd = [" this string "; "that string"; "the other string "] |> TrimNonEmptyString.Create
 
-let ee = [|" this string "; "that string"; "the other string "|] |> TrimNonEmptyString.Create
+let ee = [|" this string "; "that string"; "the other string "|] |> TrimNonEmptyString.Create
 
@@ -358,156 +356,152 @@

Why 'T1 -> 'T2 22:

module TrivialT1toT2 =
-    let tryConstruct normalize fn v =
-        fn (normalize v)
-
-    let tryConstructIndexToString i = 
-        tryConstruct id (fun i' -> 
-            (match i' with
-            | n when n < 0 -> "negative"
-            | n when n > 0 -> "positive"
+    let tryConstruct normalize fn v =
+        fn (normalize v)
+
+    let tryConstructIndexToString i = 
+        tryConstruct id (fun i' -> 
+            (match i' with
+            | n when n < 0 -> "negative"
+            | n when n > 0 -> "positive"
             | _ -> "zero" )
-            |> Some ) i
+            |> Some ) i
 
-    let tryIndexToString _ v = tryConstruct id tryConstructIndexToString v
+    let tryIndexToString _ v = tryConstruct id tryConstructIndexToString v
 
-    type IndexToStringCctor() = 
-        inherit Cctor<unit, int, string>((), tryIndexToString)
+    type IndexToStringCctor() = 
+        inherit Cctor<unit, int, string>((), tryIndexToString)
 
-type IndexToString = DependentType<TrivialT1toT2.IndexToStringCctor, unit, int, string>
+type IndexToString = DependentType<TrivialT1toT2.IndexToStringCctor, unit, int, string>
 
-let neg =  (IndexToString.TryCreate -100).Value
+let neg =  (IndexToString.TryCreate -100).Value
 
-printfn "%s" neg.Value
+printfn "%s" neg.Value
 
namespace DependentTypes
-
Multiple items
module DependentTypes

from DependentTypes

--------------------
namespace DependentTypes
-
namespace System
-
val verifyTrimNonEmptyString : 'a -> value:string -> string option
-
val value : string
-
Multiple items
val string : value:'T -> string

--------------------
type string = String
-
Multiple items
type String =
  new : value:char -> string + 7 overloads
  member Chars : int -> char
  member Clone : unit -> obj
  member CompareTo : value:obj -> int + 1 overload
  member Contains : value:string -> bool
  member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
  member EndsWith : value:string -> bool + 2 overloads
  member Equals : obj:obj -> bool + 2 overloads
  member GetEnumerator : unit -> CharEnumerator
  member GetHashCode : unit -> int
  ...

--------------------
String(value: nativeptr<char>) : String
String(value: nativeptr<sbyte>) : String
String(value: char []) : String
String(c: char, count: int) : String
String(value: nativeptr<char>, startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int) : String
String(value: char [], startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: Text.Encoding) : String
-
String.IsNullOrWhiteSpace(value: string) : bool
-
union case Option.None: Option<'T>
-
union case Option.Some: Value: 'T -> Option<'T>
-
String.Trim() : string
String.Trim([<ParamArray>] trimChars: char []) : string
-
Multiple items
type NonEmptyValidator =
  inherit Cctor<unit,string,string>
  new : unit -> NonEmptyValidator

--------------------
new : unit -> NonEmptyValidator
-
Multiple items
type Cctor<'Config,'T,'T2> =
  new : config:'Config * vfn:('Config -> 'T -> Option<'T2>) -> Cctor<'Config,'T,'T2>
  member TryCreate : x:'T -> Option<'T2>

--------------------
new : config:'Config * vfn:('Config -> 'T -> Option<'T2>) -> Cctor<'Config,'T,'T2>
-
type unit = Unit
-
Multiple items
type NonEmpty =
  inherit NonEmptyValidator
  new : unit -> NonEmpty

--------------------
new : unit -> NonEmpty
-
type TrimNonEmptyString = DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
-
Multiple items
union case LimitedValue.DependentType: 'T -> LimitedValue<'Validator,'Config,'T>

--------------------
type DependentType<'Cctor,'Config,'T,'T2 (requires 'Cctor :> Cctor<'Config,'T,'T2> and default constructor)> =
  | DependentType of 'T2
    override ToString : unit -> string
    member Value : 'T2
    static member ConvertTo : x:DependentType<'x,'y,'q,'r> -> Option<DependentType<'a,'b,'r,'s>> (requires 'x :> Cctor<'y,'q,'r> and default constructor and 'a :> Cctor<'b,'r,'s> and default constructor)
    static member Create : xs:'T list -> DependentType<'Cctor,'Config,'T,'T2> list
    static member Create : xs:seq<'T> -> seq<DependentType<'Cctor,'Config,'T,'T2>>
    static member Create : x:'T -> DependentType<'Cctor,'Config,'T,'T2>
    static member Extract : x:DependentType<'Cctor,'Config,'T,'T2> -> 'T2
    static member TryCreate : x:'T option -> Option<DependentType<'Cctor,'Config,'T,'T2>>
    static member TryCreate : x:'T -> Option<DependentType<'Cctor,'Config,'T,'T2>>
-
module TrimNonEmptyStringDef

from Tutorial
-
Multiple items
type NonEmpty =
  inherit NonEmptyValidator
  new : unit -> NonEmpty

--------------------
new : unit -> TrimNonEmptyStringDef.NonEmpty
-
val myGoodString : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
-
static member DependentType.TryCreate : x:'T option -> Option<DependentType<'Cctor,'Config,'T,'T2>>
static member DependentType.TryCreate : x:'T -> Option<DependentType<'Cctor,'Config,'T,'T2>>
-
val notTrimNonEmptyString : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
-
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
-
property DependentType.Value: string
-
property Option.IsNone: bool
-
val verifyUtcDateTime : 'a -> value:DateTime -> DateTime option
-
val value : DateTime
-
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
-
DateTime.ToUniversalTime() : DateTime
-
Multiple items
type UtcDateTimeValidator =
  inherit Cctor<unit,DateTime,DateTime>
  new : unit -> UtcDateTimeValidator

--------------------
new : unit -> UtcDateTimeValidator
-
Multiple items
type ValidUtcDateTime =
  inherit UtcDateTimeValidator
  new : unit -> ValidUtcDateTime

--------------------
new : unit -> ValidUtcDateTime
-
type UtcDateTime = DependentType<UtcDateTimeDef.ValidUtcDateTime,unit,DateTime,DateTime>
-
module UtcDateTimeDef

from Tutorial
-
Multiple items
type ValidUtcDateTime =
  inherit UtcDateTimeValidator
  new : unit -> ValidUtcDateTime

--------------------
new : unit -> UtcDateTimeDef.ValidUtcDateTime
-
val utcTime : DependentType<UtcDateTimeDef.ValidUtcDateTime,unit,DateTime,DateTime>
-
property DateTime.Now: DateTime
-
static member DependentType.Create : xs:'T list -> DependentType<'Cctor,'Config,'T,'T2> list
static member DependentType.Create : xs:seq<'T> -> seq<DependentType<'Cctor,'Config,'T,'T2>>
static member DependentType.Create : x:'T -> DependentType<'Cctor,'Config,'T,'T2>
-
val validate : normalize:('a -> 'b) -> fn:('b -> bool) -> v:'a -> 'b option
-
val normalize : ('a -> 'b)
-
val fn : ('b -> bool)
-
val v : 'a
-
val validateRange : min:'a * max:'a -> v:'a -> 'a option (requires comparison)
-
val min : 'a (requires comparison)
-
val max : 'a (requires comparison)
-
val v : 'a (requires comparison)
-
val id : x:'T -> 'T
-
Multiple items
type NumRangeValidator =
  inherit Cctor<(int * int),int,int>
  new : config:(int * int) -> NumRangeValidator

--------------------
new : config:(int * int) -> NumRangeValidator
-
val config : int * int
-
Multiple items
val int : value:'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
-
Multiple items
type MaxPos100 =
  inherit NumRangeValidator
  new : unit -> MaxPos100

--------------------
new : unit -> MaxPos100
-
type PositiveInt100 = DependentType<MaxPos100,(int * int),int,int>
-
val a : PositiveInt100 option
-
type 'T option = Option<'T>
-
val mkDependentType : x:'S -> Option<'T> (requires member TryCreate)
-
val b : Option<DependentType<MaxPos100,(int * int),int,int>>
-
val a' : int
-
property Option.Value: PositiveInt100
-
val extract : x:'S -> 'T (requires member Extract)
-
val b' : int
-
property Option.Value: DependentType<MaxPos100,(int * int),int,int>
-
property DependentType.Value: int
-
Object.ToString() : string
-
Multiple items
type MaxPos200 =
  inherit NumRangeValidator
  new : unit -> MaxPos200

--------------------
new : unit -> MaxPos200
-
type PositiveInt200 = DependentType<MaxPos100,(int * int),int,int>
-
val valToString5 : Option<PositiveInt200>
-
module Option

from Microsoft.FSharp.Core
-
val convertTo : x:'S -> Option<'T> (requires member ConvertTo)
-
property Option.Value: PositiveInt200
-
Object.GetType() : Type
-
val verifyNonEmptySet : 'a -> value:Set<'T> -> Set<'T> option (requires comparison)
-
val value : Set<'T> (requires comparison)
-
Multiple items
module Set

from Microsoft.FSharp.Collections

--------------------
type Set<'T (requires comparison)> =
  interface IComparable
  interface IEnumerable
  interface IEnumerable<'T>
  interface ICollection<'T>
  new : elements:seq<'T> -> Set<'T>
  member Add : value:'T -> Set<'T>
  member Contains : value:'T -> bool
  override Equals : obj -> bool
  member IsProperSubsetOf : otherSet:Set<'T> -> bool
  member IsProperSupersetOf : otherSet:Set<'T> -> bool
  ...

--------------------
new : elements:seq<'T> -> Set<'T>
-
property Set.Count: int
-
Multiple items
type NonEmptySetValidator<'T (requires comparison)> =
  inherit Cctor<unit,Set<'T>,Set<'T>>
  new : unit -> NonEmptySetValidator<'T>

--------------------
new : unit -> NonEmptySetValidator<'T>
-
Multiple items
type ValidNonEmptySet<'T (requires comparison)> =
  inherit NonEmptySetValidator<'T>
  new : unit -> ValidNonEmptySet<'T>

--------------------
new : unit -> ValidNonEmptySet<'T>
-
type NonEmptySet<'T (requires comparison)> = DependentType<NonEmptySetDef.ValidNonEmptySet<'T>,unit,Set<'T>,Set<'T>>
-
module NonEmptySetDef

from Tutorial
-
Multiple items
type ValidNonEmptySet<'T (requires comparison)> =
  inherit NonEmptySetValidator<'T>
  new : unit -> ValidNonEmptySet<'T>

--------------------
new : unit -> NonEmptySetDef.ValidNonEmptySet<'T>
-
val myNonEmptyIntSet : DependentType<NonEmptySetDef.ValidNonEmptySet<int>,unit,Set<int>,Set<int>>
-
val ofList : elements:'T list -> Set<'T> (requires comparison)
-
val myNonEmptyStringSet : DependentType<NonEmptySetDef.ValidNonEmptySet<string>,unit,Set<string>,Set<string>>
-
val validate : fn:('a -> bool) -> v:'a -> 'a option
-
val fn : ('a -> bool)
-
val validateMin : min:'a -> v:'a -> 'a option (requires comparison)
-
val validateMax : max:'a -> v:'a -> 'a option (requires comparison)
-
Multiple items
type NumRangeValidator =
  inherit Validator<(int * int),int>
  new : config:(int * int) -> NumRangeValidator

--------------------
new : config:(int * int) -> NumRangeValidator
-
Multiple items
type Validator<'Config,'T> =
  new : config:'Config * vfn:('Config -> 'T -> Option<'T>) -> Validator<'Config,'T>
  member Validate : x:'T -> Option<'T>

--------------------
new : config:'Config * vfn:('Config -> 'T -> Option<'T>) -> Validator<'Config,'T>
-
Multiple items
type MinNumRangeValidator =
  inherit Validator<int,int>
  new : config:int -> MinNumRangeValidator

--------------------
new : config:int -> MinNumRangeValidator
-
val config : int
-
Multiple items
type MaxNumRangeValidator =
  inherit Validator<int,int>
  new : config:int -> MaxNumRangeValidator

--------------------
new : config:int -> MaxNumRangeValidator
-
Multiple items
type MaxPos150 =
  inherit NumRangeValidator
  new : unit -> MaxPos150

--------------------
new : unit -> MaxPos150
-
Multiple items
type MaxPos20000 =
  inherit NumRangeValidator
  new : unit -> MaxPos20000

--------------------
new : unit -> MaxPos20000
-
Multiple items
type RangeMinus100To100 =
  inherit NumRangeValidator
  new : unit -> RangeMinus100To100

--------------------
new : unit -> RangeMinus100To100
-
Multiple items
type Min101 =
  inherit MinNumRangeValidator
  new : unit -> Min101

--------------------
new : unit -> Min101
-
Multiple items
type MaxMinus101 =
  inherit MaxNumRangeValidator
  new : unit -> MaxMinus101

--------------------
new : unit -> MaxMinus101
-
type PositiveInt150 = LimitedValue<IntRange.MaxPos150,(int * int),int>
-
type LimitedValue<'Validator,'Config,'T (requires 'Validator :> Validator<'Config,'T> and default constructor)> =
  | DependentType of 'T
    member Value : 'T
    static member ConvertTo : x:LimitedValue<'x,'y,'q> -> Option<LimitedValue<'a,'b,'q>> (requires 'x :> Validator<'y,'q> and default constructor and 'a :> Validator<'b,'q> and default constructor)
    static member Create : xs:'T list -> LimitedValue<'Validator,'Config,'T> list
    static member Create : xs:seq<'T> -> seq<LimitedValue<'Validator,'Config,'T>>
    static member Create : x:'T -> LimitedValue<'Validator,'Config,'T>
    static member Extract : x:LimitedValue<'Validator,'Config,'T> -> 'T
    static member TryCreate : x:'T -> Option<LimitedValue<'Validator,'Config,'T>>
-
module IntRange

from Tutorial
-
Multiple items
type MaxPos150 =
  inherit NumRangeValidator
  new : unit -> MaxPos150

--------------------
new : unit -> IntRange.MaxPos150
-
type PositiveInt20000 = LimitedValue<IntRange.MaxPos20000,(int * int),int>
-
Multiple items
type MaxPos20000 =
  inherit NumRangeValidator
  new : unit -> MaxPos20000

--------------------
new : unit -> IntRange.MaxPos20000
-
type Minus100To100 = LimitedValue<IntRange.RangeMinus100To100,(int * int),int>
-
Multiple items
type RangeMinus100To100 =
  inherit NumRangeValidator
  new : unit -> RangeMinus100To100

--------------------
new : unit -> IntRange.RangeMinus100To100
-
type GT100 = LimitedValue<IntRange.Min101,int,int>
-
Multiple items
type Min101 =
  inherit MinNumRangeValidator
  new : unit -> Min101

--------------------
new : unit -> IntRange.Min101
-
type LTminus100 = LimitedValue<IntRange.MaxMinus101,int,int>
-
Multiple items
type MaxMinus101 =
  inherit MaxNumRangeValidator
  new : unit -> MaxMinus101

--------------------
new : unit -> IntRange.MaxMinus101
-
val aa : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
-
val bb : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
-
val cc : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
-
val dd : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string> list
-
val ee : seq<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
-
val tryConstruct : normalize:('a -> 'b) -> fn:('b -> 'c) -> v:'a -> 'c
-
val fn : ('b -> 'c)
-
val tryConstructIndexToString : i:int -> string option
-
val i : int
-
val i' : int
-
val n : int
-
val tryIndexToString : 'a -> v:int -> string option
-
val v : int
-
Multiple items
type IndexToStringCctor =
  inherit Cctor<unit,int,string>
  new : unit -> IndexToStringCctor

--------------------
new : unit -> IndexToStringCctor
-
type IndexToString = DependentType<TrivialT1toT2.IndexToStringCctor,unit,int,string>
-
module TrivialT1toT2

from Tutorial
-
Multiple items
type IndexToStringCctor =
  inherit Cctor<unit,int,string>
  new : unit -> IndexToStringCctor

--------------------
new : unit -> TrivialT1toT2.IndexToStringCctor
-
val neg : DependentType<TrivialT1toT2.IndexToStringCctor,unit,int,string>
+
namespace System
+
val verifyTrimNonEmptyString : 'a -> value:string -> string option
+
val value : string
+
Multiple items
val string : value:'T -> string

--------------------
type string = String
+
Multiple items
type String =
  new : value:char -> string + 7 overloads
  member Chars : int -> char
  member Clone : unit -> obj
  member CompareTo : value:obj -> int + 1 overload
  member Contains : value:string -> bool
  member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
  member EndsWith : value:string -> bool + 2 overloads
  member Equals : obj:obj -> bool + 2 overloads
  member GetEnumerator : unit -> CharEnumerator
  member GetHashCode : unit -> int
  ...

--------------------
String(value: nativeptr<char>) : String
String(value: nativeptr<sbyte>) : String
String(value: char []) : String
String(c: char, count: int) : String
String(value: nativeptr<char>, startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int) : String
String(value: char [], startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: Text.Encoding) : String
+
String.IsNullOrWhiteSpace(value: string) : bool
+
union case Option.None: Option<'T>
+
union case Option.Some: Value: 'T -> Option<'T>
+
String.Trim() : string
String.Trim([<ParamArray>] trimChars: char []) : string
+
Multiple items
type NonEmptyValidator =
  inherit Cctor<unit,string,string>
  new : unit -> NonEmptyValidator

--------------------
new : unit -> NonEmptyValidator
+
Multiple items
type Cctor<'Config,'T,'T2> =
  new : config:'Config * vfn:('Config -> 'T -> Option<'T2>) -> Cctor<'Config,'T,'T2>
  member TryCreate : x:'T -> Option<'T2>

--------------------
new : config:'Config * vfn:('Config -> 'T -> Option<'T2>) -> Cctor<'Config,'T,'T2>
+
type unit = Unit
+
Multiple items
type NonEmpty =
  inherit NonEmptyValidator
  new : unit -> NonEmpty

--------------------
new : unit -> NonEmpty
+
type TrimNonEmptyString = DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
+
Multiple items
union case LimitedValue.DependentType: 'T -> LimitedValue<'Validator,'Config,'T>

--------------------
type DependentType<'Cctor,'Config,'T,'T2 (requires 'Cctor :> Cctor<'Config,'T,'T2> and default constructor)> =
  | DependentType of 'T2
    override ToString : unit -> string
    member Value : 'T2
    static member ConvertTo : x:DependentType<'x,'y,'q,'r> -> Option<DependentType<'a,'b,'r,'s>> (requires 'x :> Cctor<'y,'q,'r> and default constructor and 'a :> Cctor<'b,'r,'s> and default constructor)
    static member Create : xs:'T list -> DependentType<'Cctor,'Config,'T,'T2> list
    static member Create : xs:seq<'T> -> seq<DependentType<'Cctor,'Config,'T,'T2>>
    static member Create : x:'T -> DependentType<'Cctor,'Config,'T,'T2>
    static member Extract : x:DependentType<'Cctor,'Config,'T,'T2> -> 'T2
    static member TryCreate : x:'T option -> Option<DependentType<'Cctor,'Config,'T,'T2>>
    static member TryCreate : x:'T -> Option<DependentType<'Cctor,'Config,'T,'T2>>
+
module TrimNonEmptyStringDef

from Tutorial
+
Multiple items
type NonEmpty =
  inherit NonEmptyValidator
  new : unit -> NonEmpty

--------------------
new : unit -> TrimNonEmptyStringDef.NonEmpty
+
val myGoodString : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
+
static member DependentType.TryCreate : x:'T option -> Option<DependentType<'Cctor,'Config,'T,'T2>>
static member DependentType.TryCreate : x:'T -> Option<DependentType<'Cctor,'Config,'T,'T2>>
+
val notTrimNonEmptyString : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
+
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
+
property DependentType.Value: string
+
property Option.IsNone: bool
+
val verifyUtcDateTime : 'a -> value:DateTime -> DateTime option
+
val value : DateTime
+
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

--------------------
DateTime ()
   (+0 other overloads)
DateTime(ticks: int64) : DateTime
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : DateTime
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : DateTime
   (+0 other overloads)
+
DateTime.ToUniversalTime() : DateTime
+
Multiple items
type UtcDateTimeValidator =
  inherit Cctor<unit,DateTime,DateTime>
  new : unit -> UtcDateTimeValidator

--------------------
new : unit -> UtcDateTimeValidator
+
Multiple items
type ValidUtcDateTime =
  inherit UtcDateTimeValidator
  new : unit -> ValidUtcDateTime

--------------------
new : unit -> ValidUtcDateTime
+
type UtcDateTime = DependentType<UtcDateTimeDef.ValidUtcDateTime,unit,DateTime,DateTime>
+
module UtcDateTimeDef

from Tutorial
+
Multiple items
type ValidUtcDateTime =
  inherit UtcDateTimeValidator
  new : unit -> ValidUtcDateTime

--------------------
new : unit -> UtcDateTimeDef.ValidUtcDateTime
+
val utcTime : DependentType<UtcDateTimeDef.ValidUtcDateTime,unit,DateTime,DateTime>
+
property DateTime.Now: DateTime
+
static member DependentType.Create : xs:'T list -> DependentType<'Cctor,'Config,'T,'T2> list
static member DependentType.Create : xs:seq<'T> -> seq<DependentType<'Cctor,'Config,'T,'T2>>
static member DependentType.Create : x:'T -> DependentType<'Cctor,'Config,'T,'T2>
+
val validate : normalize:('a -> 'b) -> fn:('b -> bool) -> v:'a -> 'b option
+
val normalize : ('a -> 'b)
+
val fn : ('b -> bool)
+
val v : 'a
+
val validateRange : min:'a * max:'a -> v:'a -> 'a option (requires comparison)
+
val min : 'a (requires comparison)
+
val max : 'a (requires comparison)
+
val v : 'a (requires comparison)
+
val id : x:'T -> 'T
+
Multiple items
type NumRangeValidator =
  inherit Cctor<(int * int),int,int>
  new : config:(int * int) -> NumRangeValidator

--------------------
new : config:(int * int) -> NumRangeValidator
+
val config : int * int
+
Multiple items
val int : value:'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
+
Multiple items
type MaxPos100 =
  inherit NumRangeValidator
  new : unit -> MaxPos100

--------------------
new : unit -> MaxPos100
+
type PositiveInt100 = DependentType<MaxPos100,(int * int),int,int>
+
val a : PositiveInt100 option
+
type 'T option = Option<'T>
+
val b : Option<DependentType<MaxPos100,(int * int),int,int>>
+
val a' : int
+
property Option.Value: PositiveInt100
+
val b' : int
+
property Option.Value: DependentType<MaxPos100,(int * int),int,int>
+
property DependentType.Value: int
+
Object.ToString() : string
+
Multiple items
type MaxPos200 =
  inherit NumRangeValidator
  new : unit -> MaxPos200

--------------------
new : unit -> MaxPos200
+
type PositiveInt200 = DependentType<MaxPos100,(int * int),int,int>
+
val valToString5 : Option<PositiveInt200>
+
module Option

from Microsoft.FSharp.Core
+
property Option.Value: PositiveInt200
+
Object.GetType() : Type
+
val verifyNonEmptySet : 'a -> value:Set<'T> -> Set<'T> option (requires comparison)
+
val value : Set<'T> (requires comparison)
+
Multiple items
module Set

from Microsoft.FSharp.Collections

--------------------
type Set<'T (requires comparison)> =
  interface IComparable
  interface IEnumerable
  interface IEnumerable<'T>
  interface ICollection<'T>
  new : elements:seq<'T> -> Set<'T>
  member Add : value:'T -> Set<'T>
  member Contains : value:'T -> bool
  override Equals : obj -> bool
  member IsProperSubsetOf : otherSet:Set<'T> -> bool
  member IsProperSupersetOf : otherSet:Set<'T> -> bool
  ...

--------------------
new : elements:seq<'T> -> Set<'T>
+
property Set.Count: int
+
Multiple items
type NonEmptySetValidator<'T (requires comparison)> =
  inherit Cctor<unit,Set<'T>,Set<'T>>
  new : unit -> NonEmptySetValidator<'T>

--------------------
new : unit -> NonEmptySetValidator<'T>
+
Multiple items
type ValidNonEmptySet<'T (requires comparison)> =
  inherit NonEmptySetValidator<'T>
  new : unit -> ValidNonEmptySet<'T>

--------------------
new : unit -> ValidNonEmptySet<'T>
+
type NonEmptySet<'T (requires comparison)> = DependentType<NonEmptySetDef.ValidNonEmptySet<'T>,unit,Set<'T>,Set<'T>>
+
module NonEmptySetDef

from Tutorial
+
Multiple items
type ValidNonEmptySet<'T (requires comparison)> =
  inherit NonEmptySetValidator<'T>
  new : unit -> ValidNonEmptySet<'T>

--------------------
new : unit -> NonEmptySetDef.ValidNonEmptySet<'T>
+
val myNonEmptyIntSet : DependentType<NonEmptySetDef.ValidNonEmptySet<int>,unit,Set<int>,Set<int>>
+
val ofList : elements:'T list -> Set<'T> (requires comparison)
+
val myNonEmptyStringSet : DependentType<NonEmptySetDef.ValidNonEmptySet<string>,unit,Set<string>,Set<string>>
+
val validate : fn:('a -> bool) -> v:'a -> 'a option
+
val fn : ('a -> bool)
+
val validateMin : min:'a -> v:'a -> 'a option (requires comparison)
+
val validateMax : max:'a -> v:'a -> 'a option (requires comparison)
+
Multiple items
type NumRangeValidator =
  inherit Validator<(int * int),int>
  new : config:(int * int) -> NumRangeValidator

--------------------
new : config:(int * int) -> NumRangeValidator
+
Multiple items
type Validator<'Config,'T> =
  new : config:'Config * vfn:('Config -> 'T -> Option<'T>) -> Validator<'Config,'T>
  member Validate : x:'T -> Option<'T>

--------------------
new : config:'Config * vfn:('Config -> 'T -> Option<'T>) -> Validator<'Config,'T>
+
Multiple items
type MinNumRangeValidator =
  inherit Validator<int,int>
  new : config:int -> MinNumRangeValidator

--------------------
new : config:int -> MinNumRangeValidator
+
val config : int
+
Multiple items
type MaxNumRangeValidator =
  inherit Validator<int,int>
  new : config:int -> MaxNumRangeValidator

--------------------
new : config:int -> MaxNumRangeValidator
+
Multiple items
type MaxPos150 =
  inherit NumRangeValidator
  new : unit -> MaxPos150

--------------------
new : unit -> MaxPos150
+
Multiple items
type MaxPos20000 =
  inherit NumRangeValidator
  new : unit -> MaxPos20000

--------------------
new : unit -> MaxPos20000
+
Multiple items
type RangeMinus100To100 =
  inherit NumRangeValidator
  new : unit -> RangeMinus100To100

--------------------
new : unit -> RangeMinus100To100
+
Multiple items
type Min101 =
  inherit MinNumRangeValidator
  new : unit -> Min101

--------------------
new : unit -> Min101
+
Multiple items
type MaxMinus101 =
  inherit MaxNumRangeValidator
  new : unit -> MaxMinus101

--------------------
new : unit -> MaxMinus101
+
type PositiveInt150 = LimitedValue<IntRange.MaxPos150,(int * int),int>
+
type LimitedValue<'Validator,'Config,'T (requires 'Validator :> Validator<'Config,'T> and default constructor)> =
  | DependentType of 'T
    member Value : 'T
    static member ConvertTo : x:LimitedValue<'x,'y,'q> -> Option<LimitedValue<'a,'b,'q>> (requires 'x :> Validator<'y,'q> and default constructor and 'a :> Validator<'b,'q> and default constructor)
    static member Create : xs:'T list -> LimitedValue<'Validator,'Config,'T> list
    static member Create : xs:seq<'T> -> seq<LimitedValue<'Validator,'Config,'T>>
    static member Create : x:'T -> LimitedValue<'Validator,'Config,'T>
    static member Extract : x:LimitedValue<'Validator,'Config,'T> -> 'T
    static member TryCreate : x:'T -> Option<LimitedValue<'Validator,'Config,'T>>
+
module IntRange

from Tutorial
+
Multiple items
type MaxPos150 =
  inherit NumRangeValidator
  new : unit -> MaxPos150

--------------------
new : unit -> IntRange.MaxPos150
+
type PositiveInt20000 = LimitedValue<IntRange.MaxPos20000,(int * int),int>
+
Multiple items
type MaxPos20000 =
  inherit NumRangeValidator
  new : unit -> MaxPos20000

--------------------
new : unit -> IntRange.MaxPos20000
+
type Minus100To100 = LimitedValue<IntRange.RangeMinus100To100,(int * int),int>
+
Multiple items
type RangeMinus100To100 =
  inherit NumRangeValidator
  new : unit -> RangeMinus100To100

--------------------
new : unit -> IntRange.RangeMinus100To100
+
type GT100 = LimitedValue<IntRange.Min101,int,int>
+
Multiple items
type Min101 =
  inherit MinNumRangeValidator
  new : unit -> Min101

--------------------
new : unit -> IntRange.Min101
+
type LTminus100 = LimitedValue<IntRange.MaxMinus101,int,int>
+
Multiple items
type MaxMinus101 =
  inherit MaxNumRangeValidator
  new : unit -> MaxMinus101

--------------------
new : unit -> IntRange.MaxMinus101
+
val aa : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
+
val bb : Option<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
+
val cc : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>
+
val dd : DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string> list
+
val ee : seq<DependentType<TrimNonEmptyStringDef.NonEmpty,unit,string,string>>
+
val tryConstruct : normalize:('a -> 'b) -> fn:('b -> 'c) -> v:'a -> 'c
+
val fn : ('b -> 'c)
+
val tryConstructIndexToString : i:int -> string option
+
val i : int
+
val i' : int
+
val n : int
+
val tryIndexToString : 'a -> v:int -> string option
+
val v : int
+
Multiple items
type IndexToStringCctor =
  inherit Cctor<unit,int,string>
  new : unit -> IndexToStringCctor

--------------------
new : unit -> IndexToStringCctor
+
type IndexToString = DependentType<TrivialT1toT2.IndexToStringCctor,unit,int,string>
+
module TrivialT1toT2

from Tutorial
+
Multiple items
type IndexToStringCctor =
  inherit Cctor<unit,int,string>
  new : unit -> IndexToStringCctor

--------------------
new : unit -> TrivialT1toT2.IndexToStringCctor
+
val neg : DependentType<TrivialT1toT2.IndexToStringCctor,unit,int,string>

diff --git a/src/DependentTypes/DependentTypes.fs b/src/DependentTypes/DependentTypes.fs index 8fc90e4..1ed6e8e 100644 --- a/src/DependentTypes/DependentTypes.fs +++ b/src/DependentTypes/DependentTypes.fs @@ -1,5 +1,6 @@ namespace DependentTypes +/// Inline helper functions. module DependentTypes = let inline mkDependentType (x: ^S) : Option< ^T> = (^T: (static member TryCreate: ^S -> Option< ^T>) x) @@ -14,9 +15,11 @@ open DependentTypes open System [] +/// Constructor / validator type for DependentType 'T1 -> 'T2 style dependent types type Cctor<'Config, 'T, 'T2> (config: 'Config, vfn: 'Config -> 'T -> Option<'T2>) = member __.TryCreate(x:'T) : Option<'T2> = vfn config x +///'T1 -> 'T2 style dependent type type DependentType<'Cctor, 'Config, 'T, 'T2 when 'Cctor :> Cctor<'Config, 'T, 'T2> and 'Cctor : (new: unit -> 'Cctor)> = DependentType of 'T2 @@ -49,9 +52,11 @@ type DependentType<'Cctor, 'Config, 'T, 'T2 when 'Cctor :> Cctor<'Config, 'T, 'T mkDependentType v [] +/// Constructor / validator type for LimitedValue 'T1 -> 'T1 style dependent types type Validator<'Config, 'T> (config: 'Config, vfn: 'Config -> 'T -> Option<'T>) = member __.Validate(x:'T) : Option<'T> = vfn config x +/// 'T1 -> 'T1 style dependent type type LimitedValue<'Validator, 'Config, 'T when 'Validator :> Validator<'Config, 'T> and 'Validator : (new: unit -> 'Validator)> = DependentType of 'T diff --git a/src/DomainLib/Domain.fsi b/src/DomainLib/Domain.fsi index d2f8fed..43d381c 100644 --- a/src/DomainLib/Domain.fsi +++ b/src/DomainLib/Domain.fsi @@ -13,6 +13,7 @@ module TrimNonEmptyStringDef = inherit NonEmptyValidator new : unit -> NonEmpty +/// Trimmed, non-empty, non-null string type TrimNonEmptyString = DependentType module UtcDateTimeDef = @@ -24,6 +25,7 @@ module UtcDateTimeDef = inherit UtcDateTimeValidator new : unit -> ValidUtcDateTime +/// DateTime set to UTC. type UtcDateTime = DependentType module NonEmptySetDef = @@ -35,7 +37,7 @@ module NonEmptySetDef = inherit NonEmptySetValidator<'T> new : unit -> ValidNonEmptySet<'T> -/// note using LimitedValue<'Validator, 'Config, 'T> type, not DependentType<'Cctor, 'Config, 'T, 'T2> +/// Generic non-empty Set<'T> type NonEmptySet<'T when 'T : comparison> = LimitedValue, unit, Set<'T>> module UpperLatinDef = @@ -51,7 +53,9 @@ module UpperLatinDef = inherit UpperLatinValidator new : unit -> ValidUpperLatin3 +/// Uppercase latin string of length 2. type UpperLatin2 = DependentType +/// Uppercase latin string of length 3. type UpperLatin3 = DependentType module DigitsDef = @@ -71,10 +75,14 @@ module DigitsDef = type ValidDigits4 = inherit DigitsValidator new : unit -> ValidDigits4 - + +/// String of digit characters [0-9]. type Digits = DependentType +/// String of digit characters [0-9] and length 2. type Digits2 = DependentType +/// String of digit characters [0-9] and length 3. type Digits3 = DependentType +/// String of digit characters [0-9] and length 4. type Digits4 = DependentType module IntRange = @@ -104,8 +112,13 @@ module IntRange = inherit MaxNumRangeValidator new : unit -> MaxMinus101 +/// Integer in range 0 to 100. type PositiveInt100 = LimitedValue +/// Integer in range 0 to 20000. type PositiveInt20000 = LimitedValue +/// Integer in range -100 to 100. type Minus100To100 = LimitedValue +/// Integer greater than 100. type GT100 = LimitedValue +/// Integer less than -100. type LTminus100 = LimitedValue \ No newline at end of file