@@ -65,32 +65,32 @@ module React
6565 ) where
6666
6767import Prelude
68- import Control.Monad.Eff (Eff )
68+ import Control.Monad.Eff (kind Effect , Eff )
6969import Unsafe.Coerce (unsafeCoerce )
7070
7171-- | Name of a tag.
7272type TagName = String
7373
7474-- | A virtual DOM node, or component.
75- foreign import data ReactElement :: *
75+ foreign import data ReactElement :: Type
7676
7777-- | A mounted react component
78- foreign import data ReactComponent :: *
78+ foreign import data ReactComponent :: Type
7979
8080-- | A reference to a component, essentially React's `this`.
81- foreign import data ReactThis :: * -> * -> *
81+ foreign import data ReactThis :: Type -> Type -> Type
8282
8383-- | An event handler. The type argument represents the type of the event.
84- foreign import data EventHandler :: * -> *
84+ foreign import data EventHandler :: Type -> Type
8585
8686-- | This phantom type indicates that read access to a resource is allowed.
87- foreign import data Read :: !
87+ foreign import data Read :: Effect
8888
8989-- | This phantom type indicates that write access to a resource is allowed.
90- foreign import data Write :: !
90+ foreign import data Write :: Effect
9191
9292-- | An access synonym which indicates that neither read nor write access are allowed.
93- type Disallowed = () :: # !
93+ type Disallowed = () :: # Effect
9494
9595-- | An access synonym which indicates that both read and write access are allowed.
9696type ReadWrite = (read :: Read , write :: Write )
@@ -101,21 +101,21 @@ type ReadOnly = (read :: Read)
101101-- | This effect indicates that a computation may read or write the component state.
102102-- |
103103-- | The first type argument is a row of access types (`Read`, `Write`).
104- foreign import data ReactState :: # ! -> !
104+ foreign import data ReactState :: # Effect -> Effect
105105
106106-- | This effect indicates that a computation may read the component props.
107- foreign import data ReactProps :: !
107+ foreign import data ReactProps :: Effect
108108
109109-- | This effect indicates that a computation may read the component refs.
110110-- |
111111-- | The first type argument is a row of access types (`Read`, `Write`).
112- foreign import data ReactRefs :: # ! -> !
112+ foreign import data ReactRefs :: # Effect -> Effect
113113
114114-- | The type of refs objects.
115- foreign import data Refs :: *
115+ foreign import data Refs :: Type
116116
117117-- | The type of DOM events.
118- foreign import data Event :: *
118+ foreign import data Event :: Type
119119
120120-- | The type of mouse events.
121121type MouseEvent =
@@ -282,7 +282,7 @@ spec' getInitialState renderFn =
282282 }
283283
284284-- | React class for components.
285- foreign import data ReactClass :: * -> *
285+ foreign import data ReactClass :: Type -> Type
286286
287287-- | Read the component props.
288288foreign import getProps :: forall props state eff .
@@ -360,7 +360,7 @@ foreign import createFactory :: forall props.
360360 ReactClass props -> props -> ReactElement
361361
362362-- | Internal representation for the children elements passed to a component
363- foreign import data Children :: *
363+ foreign import data Children :: Type
364364
365365-- | Internal conversion function from children elements to an array of React elements
366366foreign import childrenToArray :: Children -> Array ReactElement
0 commit comments