@@ -230,29 +230,29 @@ project1Distrib Out _ = \acbc -> return (either (\(a, c) -> (Left a, c)) (\(b, c
230
230
231
231
project1 :: (forall x y . f x y -> x -> IO y ) -> CSD f a b -> ProjectedF a b
232
232
project1 hdl (Perf @ l act) (_ :: Proxy t )
233
- | reify @ l == reify @ t = \ x -> async (wait x >>= hdl act)
233
+ | eqLoc @ l @ t = \ x -> async (wait x >>= hdl act)
234
234
| otherwise = \ _ -> return absent
235
235
project1 _ (Comm @ s @ r ) (_ :: Proxy t )
236
- | reify @ s == reify @ r = return
237
- | reify @ t == reify @ s = \ x -> do
236
+ | eqLoc @ s @ r = return
237
+ | eqLoc @ t @ s = \ x -> do
238
238
i <- inc
239
239
lift $ send (reify @ r ) i x -- there's dangling Async there
240
240
return absent
241
- | reify @ t == reify @ r = \ _ -> do
241
+ | eqLoc @ t @ r = \ _ -> do
242
242
i <- inc; lift $ recv i
243
243
| otherwise = \ _ -> inc >> return absent
244
244
project1 hdl (Seq f g) t = \ a -> project1 hdl f t a >>= project1 hdl g t
245
245
project1 hdl (Par f g) t = \ (a, b) -> (,) <$> project1 hdl f t a <*> project1 hdl g t b
246
246
project1 _ (Fork @ l ) (_ :: Proxy t )
247
- | reify @ l == reify @ t = \ xy -> (,) <$> async (fst <$> wait xy) <*> async (snd <$> wait xy)
247
+ | eqLoc @ l @ t = \ xy -> (,) <$> async (fst <$> wait xy) <*> async (snd <$> wait xy)
248
248
| otherwise = \ _ -> return (absent, absent)
249
249
project1 _ (Join @ l ) (_ :: Proxy t )
250
- | reify @ l == reify @ t = \ (x, y) -> async ((,) <$> wait x <*> wait y)
250
+ | eqLoc @ l @ t = \ (x, y) -> async ((,) <$> wait x <*> wait y)
251
251
| otherwise = \ _ -> return absent
252
252
project1 _ (Perm p) t = project1Perm p t
253
253
-- conditionals
254
254
project1 _ (Split @ s ) (_ :: Proxy t )
255
- | reify @ t == reify @ s = \ xy -> do
255
+ | eqLoc @ s @ t = \ xy -> do
256
256
xy' <- wait xy
257
257
i <- inc
258
258
case xy' of
@@ -270,7 +270,7 @@ project1 _ (Split @s) (_ :: Proxy t)
270
270
then return (Left absent)
271
271
else return (Right absent)
272
272
project1 _ (Merge @ l ) (_ :: Proxy t )
273
- | reify @ t == reify @ l = \ case
273
+ | eqLoc @ l @ t = \ case
274
274
(Left a) -> return (Left <$> a)
275
275
(Right b) -> return (Right <$> b)
276
276
| otherwise = \ _ -> return absent
0 commit comments