Skip to content

Commit

Permalink
Prevent BLS Affine values from being coerced.
Browse files Browse the repository at this point in the history
The same safeguard already existed for the Point type, but we also need
it for Affine.
  • Loading branch information
tdammers authored and lehins committed Jun 28, 2023
1 parent cb31fe9 commit 78e5d3f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ type Point2 = Point Curve2

newtype Affine curve = Affine (ForeignPtr Void)

-- Making sure different 'Affine's are not 'Coercible', which would ruin the
-- intended type safety:
type role Affine nominal

type Affine1 = Affine Curve1
type Affine2 = Affine Curve2

Expand Down

0 comments on commit 78e5d3f

Please sign in to comment.