Skip to content

Commit f1bebca

Browse files
committed
Add roles declarations to forbid unsafe coercions
1 parent 5520466 commit f1bebca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Data/Options.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ import Foreign.Object as Object
118118
-- | API are not accidentally passed to some other API.
119119
newtype Options opt = Options (Array (Tuple String Foreign))
120120

121+
type role Options nominal
122+
121123
derive instance newtypeOptions :: Newtype (Options opt) _
122124
derive newtype instance semigroupOptionsSemigroup (Options opt)
123125
derive newtype instance monoidOptionsMonoid (Options opt)

0 commit comments

Comments
 (0)