@@ -12,13 +12,13 @@ module React.Basic.Events
12
12
) where
13
13
14
14
import Prelude
15
- import Data.Symbol (class IsSymbol , SProxy (SProxy) )
15
+ import Data.Symbol (class IsSymbol )
16
16
import Effect (Effect )
17
17
import Effect.Uncurried (EffectFn1 , mkEffectFn1 )
18
18
import Prim.Row as Row
19
19
import Prim.RowList (class RowToList , RowList , Cons , Nil )
20
20
import Record (delete , get , insert )
21
- import Type.Data.RowList ( RLProxy (..))
21
+ import Type.Proxy ( Proxy (..))
22
22
23
23
-- | An event handler, which receives a `SyntheticEvent` and performs some
24
24
-- | effects in return.
@@ -80,7 +80,7 @@ syntheticEvent :: EventFn SyntheticEvent SyntheticEvent
80
80
syntheticEvent = identity
81
81
82
82
class Merge (rl :: RowList Type ) fns a r | rl -> fns , rl a -> r where
83
- mergeImpl :: RLProxy rl -> Record fns -> EventFn a (Record r )
83
+ mergeImpl :: Proxy rl -> Record fns -> EventFn a (Record r )
84
84
85
85
instance mergeNil :: Merge Nil () a () where
86
86
mergeImpl _ _ = EventFn \_ -> {}
@@ -97,13 +97,13 @@ instance mergeCons ::
97
97
mergeImpl _ fns =
98
98
EventFn \a ->
99
99
let
100
- EventFn inner = mergeImpl (RLProxy :: RLProxy rest ) (delete l fns)
100
+ EventFn inner = mergeImpl (Proxy :: Proxy rest ) (delete l fns)
101
101
102
102
EventFn f = get l fns
103
103
in
104
104
insert l (f a) (inner a)
105
105
where
106
- l = SProxy :: SProxy l
106
+ l = Proxy :: Proxy l
107
107
108
108
-- | Merge multiple `EventFn` operations and collect their results.
109
109
-- |
@@ -120,4 +120,4 @@ merge ::
120
120
Merge fns_list fns a r =>
121
121
Record fns ->
122
122
EventFn a (Record r )
123
- merge = mergeImpl (RLProxy :: RLProxy fns_list )
123
+ merge = mergeImpl (Proxy :: Proxy fns_list )
0 commit comments