diff --git a/cardano-crypto-class/src/Cardano/Crypto/EllipticCurve/BLS12_381/Internal.hs b/cardano-crypto-class/src/Cardano/Crypto/EllipticCurve/BLS12_381/Internal.hs index b657587d6..0785ca95a 100644 --- a/cardano-crypto-class/src/Cardano/Crypto/EllipticCurve/BLS12_381/Internal.hs +++ b/cardano-crypto-class/src/Cardano/Crypto/EllipticCurve/BLS12_381/Internal.hs @@ -5,6 +5,7 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE RoleAnnotations #-} module Cardano.Crypto.EllipticCurve.BLS12_381.Internal ( @@ -221,6 +222,10 @@ instance BLS curve => Eq (AffinePtr curve) where -- | prime order subgroup. newtype Point curve = Point (ForeignPtr Void) +-- Making sure different 'Point's are not 'Coercible', which would ruin the +-- intended type safety: +type role Point nominal + type Point1 = Point Curve1 type Point2 = Point Curve2