-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroot.go
41 lines (30 loc) · 1010 Bytes
/
root.go
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
package monadgo
import "reflect"
var (
typeValues = []reflect.Type{reflect.TypeOf(reflect.Value{})}
typeError = reflect.TypeOf((*error)(nil)).Elem()
)
var (
typeAny = reflect.TypeOf((*Any)(nil)).Elem()
unit Unit = _unit{}
unitValue = reflect.ValueOf(unit)
typeUnit = reflect.TypeOf(unit)
null Null = &_null{}
nullValue = reflect.ValueOf(null)
typeNull = reflect.TypeOf(null)
nothing = &_nothing{null}
nothingValue = reflect.ValueOf(nothing)
typeNothing = reflect.TypeOf((*Nothing)(nil)).Elem()
nothings = []Nothing{}
typeNothings = reflect.TypeOf(nothings)
nothingsValue = reflect.ValueOf(nothings)
typeSeq = reflect.TypeOf((*sequence)(nil)).Elem()
)
var (
typeTuple = reflect.TypeOf((*Tuple)(nil)).Elem()
typeTuple2 = reflect.TypeOf(Tuple2{})
typeTuple3 = reflect.TypeOf(Tuple3{})
typeTuple4 = reflect.TypeOf(Tuple4{})
typePair = reflect.TypeOf(Pair{})
typeTuples = []reflect.Type{typeTuple2, typeTuple3, typeTuple4, typeTuple}
)