/
Input.fs
65 lines (50 loc) · 1.56 KB
/
Input.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
namespace Input
open Myriad.Plugins
[<Generator.Lenses("lens")>]
[<Generator.Fields "fields">]
type Test1 = { one: int; two: string; three: float; four: float32 }
type Test2 = { oney: Test1; two: string }
[<Generator.Lenses("lens", "Example.Lens")>]
type RecordWithWrappedLens =
{ one: int }
[<Generator.Lenses ("lens")>]
type RecordWithEmptyWrapperName =
{ one_empty_wrapper_name: int }
[<Generator.Lenses("lens", typedefof<Example.Lens<_, _>>)>]
type RecordWithWrappedLensViaTypedefof =
{ one_typedefof: Option<int> }
[<Generator.Lenses("lens", typeof<Example.Lens<_, _>>)>]
type RecordWithWrappedLensViaTypeof =
{ one_typeof: Option<int> }
[<Generator.Lenses("lens")>]
type SingleCaseDU = Single of int
[<Generator.Lenses("lens", typeof<Example.Lens<_, _>>)>]
type WrappedSingleCaseDU = SingleWrapped of int
[<RequireQualifiedAccess>]
[<Generator.Lenses("lens")>]
type FullyQualifiedDU = FullyQualified of string
module ModuleWithDUs =
[<Generator.Lenses("lens")>]
type Module_SingleCaseDU = Single of int
[<Generator.Lenses("lens", "Example.Lens")>]
type Module_WrappedSingleCaseDU = SingleWrapped of int
[<Generator.Lenses("lens")>]
[<RequireQualifiedAccess>]
type Module_FullyQualifiedDU = FullyQualifiedCase of int
[<Generator.Lenses("lens", "Example.Lens")>]
type Address = {
Street : string
HouseNumber : int
}
[<Generator.Lenses("lens", "Example.Lens")>]
type Person = {
Name : string
Address : Address
}
[<Generator.DuCases "dus">]
type Currency =
| CAD
| PLN
| EUR
| USD
| Custom of string