Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 1c1a1ec

Browse files
kl0tlthomashoneyman
authored andcommitted
Add roles declarations to allow safe coercions
1 parent fcba941 commit 1c1a1ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Web/Promise/Internal.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import Web.Promise.Rejection (Rejection)
88

99
foreign import data Promise :: Type -> Type
1010

11+
type role Promise representational
12+
1113
foreign import new :: forall a. EffectFn1 (EffectFn2 (EffectFn1 a Unit) (EffectFn1 Rejection Unit) Unit) (Promise a)
1214

1315
foreign import then_ :: forall a b. EffectFn2 (EffectFn1 a (Promise b)) (Promise a) (Promise b)

0 commit comments

Comments
 (0)