@@ -24,52 +24,57 @@ module React where
2424 " var noop2 = noop0"
2525 :: forall a b eff result. a -> b -> Eff ( eff ) result
2626
27- type ReadProps eff props result = Eff (
27+ type ReadProps props refs result = Eff (
2828 p :: ReadPropsEff props ,
29+ f :: ReadRefsEff refs ,
2930 dom :: DOM ,
3031 trace :: Trace
3132 ) result
3233
33- type ReadState eff props state result = Eff (
34+ type ReadState props refs state result = Eff (
3435 p :: ReadPropsEff props ,
36+ f :: ReadRefsEff refs ,
3537 r :: ReadStateEff state ,
3638 dom :: DOM ,
3739 trace :: Trace
3840 ) result
3941
40- type ReadWriteState eff props state result = Eff (
42+ type ReadWriteState props refs state result = Eff (
4143 p :: ReadPropsEff props ,
44+ f :: ReadRefsEff refs ,
4245 r :: ReadStateEff state ,
4346 w :: WriteStateEff state ,
4447 dom :: DOM
4548 ) result
4649
47- type Render props state = Eff (
50+ type Render props refs state = Eff (
4851 p :: ReadPropsEff props ,
52+ f :: ReadRefsEff refs ,
4953 r :: ReadStateEff state ,
5054 trace :: Trace
5155 ) UI
5256
53- type ShouldComponentUpdate props state =
57+ type ShouldComponentUpdate props refs state =
5458 props -> state -> Eff (
5559 p :: ReadPropsEff props ,
60+ f :: ReadRefsEff refs ,
5661 r :: ReadStateEff state ,
5762 w :: WriteStateEff state ,
5863 trace :: Trace
5964 ) Boolean
6065
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 {}
7075 }
7176
72- spec :: forall eff props state. UISpec eff props state
77+ spec :: forall props refs state. UISpec props refs state
7378 spec =
7479 { getInitialState : noop0
7580 , componentWillMount : noop0
@@ -81,7 +86,7 @@ module React where
8186 , componentWillUnmount : noop0
8287 }
8388 where
84- updateAlways :: forall props state. ShouldComponentUpdate props state
89+ updateAlways :: forall props refs state. ShouldComponentUpdate props refs state
8590 updateAlways props state = return true
8691
8792 foreign import getProps
@@ -179,9 +184,9 @@ module React where
179184 \ return React.createClass(specs); \
180185 \ } \
181186 \ }"
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
185190 -> (props -> UI )
186191
187192 type DOMEvent = forall attrs. { | attrs}
0 commit comments