|
9 | 9 | {-# LANGUAGE TypeFamilies #-}
|
10 | 10 | {-# LANGUAGE UndecidableInstances #-}
|
11 | 11 | {-# LANGUAGE PolyKinds #-}
|
| 12 | +{-# LANGUAGE TypeApplications #-} |
12 | 13 | {-# LANGUAGE RankNTypes #-}
|
13 | 14 | -- |
|
14 | 15 | -- Module:
|
@@ -151,13 +152,16 @@ instance Reflex t => Reflex (ProfiledTimeline t) where
|
151 | 152 | currentIncremental (Incremental_Profiled i) = coerce $ currentIncremental i
|
152 | 153 | updatedIncremental (Incremental_Profiled i) = coerce $ profileEvent $ updatedIncremental i
|
153 | 154 | incrementalToDynamic (Incremental_Profiled i) = coerce $ incrementalToDynamic i
|
154 |
| - behaviorCoercion (c :: Coercion a b) = case behaviorCoercion c :: Coercion (Behavior t a) (Behavior t b) of |
155 |
| - Coercion -> unsafeCoerce (Coercion :: Coercion (Behavior (ProfiledTimeline t) a) (Behavior (ProfiledTimeline t) a)) --TODO: Figure out how to make this typecheck without the unsafeCoerce |
156 |
| - eventCoercion (c :: Coercion a b) = case eventCoercion c :: Coercion (Event t a) (Event t b) of |
157 |
| - Coercion -> unsafeCoerce (Coercion :: Coercion (Event (ProfiledTimeline t) a) (Event (ProfiledTimeline t) a)) --TODO: Figure out how to make this typecheck without the unsafeCoerce |
158 |
| - dynamicCoercion (c :: Coercion a b) = case dynamicCoercion c :: Coercion (Dynamic t a) (Dynamic t b) of |
159 |
| - Coercion -> unsafeCoerce (Coercion :: Coercion (Dynamic (ProfiledTimeline t) a) (Dynamic (ProfiledTimeline t) a)) --TODO: Figure out how to make this typecheck without the unsafeCoerce |
160 |
| - mergeIntIncremental = Event_Profiled . mergeIntIncremental . (unsafeCoerce :: Incremental (ProfiledTimeline t) (PatchIntMap (Event (ProfiledTimeline t) a)) -> Incremental t (PatchIntMap (Event t a))) |
| 155 | + behaviorCoercion c = |
| 156 | + Coercion `trans` behaviorCoercion @t c `trans` Coercion |
| 157 | + eventCoercion c = |
| 158 | + Coercion `trans` eventCoercion @t c `trans` Coercion |
| 159 | + dynamicCoercion c = |
| 160 | + Coercion `trans` dynamicCoercion @t c `trans` Coercion |
| 161 | + incrementalCoercion c d = |
| 162 | + Coercion `trans` incrementalCoercion @t c d `trans` Coercion |
| 163 | + mergeIntIncremental = Event_Profiled . mergeIntIncremental . |
| 164 | + coerceWith (Coercion `trans` incrementalCoercion Coercion Coercion `trans` Coercion) |
161 | 165 | fanInt (Event_Profiled e) = coerce $ fanInt $ profileEvent e
|
162 | 166 |
|
163 | 167 | deriving instance Functor (Dynamic t) => Functor (Dynamic (ProfiledTimeline t))
|
|
0 commit comments