@@ -24,52 +24,57 @@ module React where
24
24
" var noop2 = noop0"
25
25
:: forall a b eff result. a -> b -> Eff ( eff ) result
26
26
27
- type ReadProps eff props result = Eff (
27
+ type ReadProps props refs result = Eff (
28
28
p :: ReadPropsEff props ,
29
+ f :: ReadRefsEff refs ,
29
30
dom :: DOM ,
30
31
trace :: Trace
31
32
) result
32
33
33
- type ReadState eff props state result = Eff (
34
+ type ReadState props refs state result = Eff (
34
35
p :: ReadPropsEff props ,
36
+ f :: ReadRefsEff refs ,
35
37
r :: ReadStateEff state ,
36
38
dom :: DOM ,
37
39
trace :: Trace
38
40
) result
39
41
40
- type ReadWriteState eff props state result = Eff (
42
+ type ReadWriteState props refs state result = Eff (
41
43
p :: ReadPropsEff props ,
44
+ f :: ReadRefsEff refs ,
42
45
r :: ReadStateEff state ,
43
46
w :: WriteStateEff state ,
44
47
dom :: DOM
45
48
) result
46
49
47
- type Render props state = Eff (
50
+ type Render props refs state = Eff (
48
51
p :: ReadPropsEff props ,
52
+ f :: ReadRefsEff refs ,
49
53
r :: ReadStateEff state ,
50
54
trace :: Trace
51
55
) UI
52
56
53
- type ShouldComponentUpdate props state =
57
+ type ShouldComponentUpdate props refs state =
54
58
props -> state -> Eff (
55
59
p :: ReadPropsEff props ,
60
+ f :: ReadRefsEff refs ,
56
61
r :: ReadStateEff state ,
57
62
w :: WriteStateEff state ,
58
63
trace :: Trace
59
64
) Boolean
60
65
61
- type UISpec eff props state =
62
- { getInitialState :: ReadProps eff props state
63
- , componentWillMount :: ReadState eff props state {}
64
- , componentDidMount :: ReadWriteState eff props state {}
65
- , componentWillReceiveProps :: props -> ReadWriteState eff props state {}
66
- , shouldComponentUpdate :: ShouldComponentUpdate props state
67
- , componentWillUpdate :: props -> state -> ReadWriteState eff props state {}
68
- , componentDidUpdate :: props -> state -> ReadState eff props state {}
69
- , componentWillUnmount :: ReadState eff props state {}
66
+ type UISpec props refs state =
67
+ { getInitialState :: ReadProps props refs state
68
+ , componentWillMount :: ReadState props refs state {}
69
+ , componentDidMount :: ReadWriteState props refs state {}
70
+ , componentWillReceiveProps :: props -> ReadWriteState props refs state {}
71
+ , shouldComponentUpdate :: ShouldComponentUpdate refs props state
72
+ , componentWillUpdate :: props -> state -> ReadWriteState props refs state {}
73
+ , componentDidUpdate :: props -> state -> ReadState props refs state {}
74
+ , componentWillUnmount :: ReadState props refs state {}
70
75
}
71
76
72
- spec :: forall eff props state. UISpec eff props state
77
+ spec :: forall props refs state. UISpec props refs state
73
78
spec =
74
79
{ getInitialState : noop0
75
80
, componentWillMount : noop0
@@ -81,7 +86,7 @@ module React where
81
86
, componentWillUnmount : noop0
82
87
}
83
88
where
84
- updateAlways :: forall props state. ShouldComponentUpdate props state
89
+ updateAlways :: forall props refs state. ShouldComponentUpdate props refs state
85
90
updateAlways props state = return true
86
91
87
92
foreign import getProps
@@ -179,9 +184,9 @@ module React where
179
184
\ return React.createClass(specs); \
180
185
\ } \
181
186
\ }"
182
- :: forall eff props state.
183
- UISpec eff props state
184
- -> Render props state
187
+ :: forall props refs state.
188
+ UISpec props refs state
189
+ -> Render props refs state
185
190
-> (props -> UI )
186
191
187
192
type DOMEvent = forall attrs. { | attrs}
0 commit comments