From 3815b3b47dc063f251b9e40dc8f5bdeb067b6f3e Mon Sep 17 00:00:00 2001 From: Cyril Sobierajewicz Date: Sat, 18 Jul 2020 20:14:37 +0200 Subject: [PATCH] Add roles declarations to allow safe coercions --- src/Effect/Aff.purs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Effect/Aff.purs b/src/Effect/Aff.purs index 3d7337c..9163ca0 100644 --- a/src/Effect/Aff.purs +++ b/src/Effect/Aff.purs @@ -63,6 +63,8 @@ import Unsafe.Coerce (unsafeCoerce) -- | `makeAff` or `liftEffect`. foreign import data Aff ∷ Type → Type +type role Aff representational + instance functorAff ∷ Functor Aff where map = _map @@ -117,6 +119,8 @@ instance lazyAff ∷ Lazy (Aff a) where -- | `ParAff` and back using the `Parallel` class. foreign import data ParAff ∷ Type → Type +type role ParAff representational + instance functorParAff ∷ Functor ParAff where map = _parAffMap