@@ -774,8 +774,7 @@ instance (Unbox a, Unbox b) => G.Vector Vector (Arg a b) where
774774-- manually. Then we use deriving via to define necessary instances.
775775--
776776-- >>> :set -XTypeFamilies -XStandaloneDeriving -XDerivingVia -XMultiParamTypeClasses
777- -- >>> -- Needed to derive Prim
778- -- >>> :set -XGeneralizedNewtypeDeriving -XDataKinds -XUnboxedTuples -XPolyKinds
777+ -- >>> :set -XGeneralizedNewtypeDeriving
779778-- >>>
780779-- >>> import qualified Data.Vector.Generic as VG
781780-- >>> import qualified Data.Vector.Generic.Mutable as VGM
@@ -808,7 +807,7 @@ instance (Unbox a, Unbox b) => G.Vector Vector (Arg a b) where
808807-- >>> deriving via (VU.UnboxViaStorable Int) instance VG.Vector VU.Vector Foo
809808-- >>> instance VU.Unbox Foo
810809--
811- -- @since 0.13.0 .0
810+ -- @since 0.13.3 .0
812811newtype UnboxViaStorable a = UnboxViaStorable a
813812
814813newtype instance MVector s (UnboxViaStorable a ) = MV_UnboxViaStorable (St. MVector s a )
@@ -875,7 +874,6 @@ instance St.Storable a => Unbox (UnboxViaStorable a)
875874-- >>> :set -XTypeFamilies -XStandaloneDeriving -XDerivingVia
876875-- >>> :set -XMultiParamTypeClasses -XTypeOperators -XFlexibleInstances
877876-- >>> import qualified Data.Vector.Unboxed as VU
878- -- >>> import qualified Data.Vector.Unboxed.Mutable as VUM
879877-- >>> import qualified Data.Vector.Generic as VG
880878-- >>> import qualified Data.Vector.Generic.Mutable as VGM
881879-- >>> :{
@@ -888,7 +886,7 @@ instance St.Storable a => Unbox (UnboxViaStorable a)
888886-- >>> {-# INLINE fromURepr #-}
889887-- >>> newtype instance VU.MVector s (Foo a) = MV_Foo (VU.MVector s (Int, VU.DoNotUnboxLazy a))
890888-- >>> newtype instance VU.Vector (Foo a) = V_Foo (VU.Vector (Int, VU.DoNotUnboxLazy a))
891- -- >>> deriving via (Foo a `VU.As` (Int, VU.DoNotUnboxLazy a)) instance VGM.MVector VUM .MVector (Foo a)
889+ -- >>> deriving via (Foo a `VU.As` (Int, VU.DoNotUnboxLazy a)) instance VGM.MVector VU .MVector (Foo a)
892890-- >>> deriving via (Foo a `VU.As` (Int, VU.DoNotUnboxLazy a)) instance VG.Vector VU.Vector (Foo a)
893891-- >>> instance VU.Unbox (Foo a)
894892-- >>> :}
@@ -960,7 +958,6 @@ instance Unbox (DoNotUnboxLazy a)
960958-- >>> :set -XBangPatterns -XTypeFamilies -XStandaloneDeriving -XDerivingVia
961959-- >>> :set -XMultiParamTypeClasses -XTypeOperators -XFlexibleInstances
962960-- >>> import qualified Data.Vector.Unboxed as VU
963- -- >>> import qualified Data.Vector.Unboxed.Mutable as VUM
964961-- >>> import qualified Data.Vector.Generic as VG
965962-- >>> import qualified Data.Vector.Generic.Mutable as VGM
966963-- >>> :{
@@ -973,7 +970,7 @@ instance Unbox (DoNotUnboxLazy a)
973970-- >>> {-# INLINE fromURepr #-}
974971-- >>> newtype instance VU.MVector s (Bar a) = MV_Bar (VU.MVector s (Int, VU.DoNotUnboxStrict a))
975972-- >>> newtype instance VU.Vector (Bar a) = V_Bar (VU.Vector (Int, VU.DoNotUnboxStrict a))
976- -- >>> deriving via (Bar a `VU.As` (Int, VU.DoNotUnboxStrict a)) instance VGM.MVector VUM .MVector (Bar a)
973+ -- >>> deriving via (Bar a `VU.As` (Int, VU.DoNotUnboxStrict a)) instance VGM.MVector VU .MVector (Bar a)
977974-- >>> deriving via (Bar a `VU.As` (Int, VU.DoNotUnboxStrict a)) instance VG.Vector VU.Vector (Bar a)
978975-- >>> instance VU.Unbox (Bar a)
979976-- >>> :}
@@ -1045,7 +1042,6 @@ instance Unbox (DoNotUnboxStrict a)
10451042-- >>> :set -XTypeFamilies -XStandaloneDeriving -XDerivingVia
10461043-- >>> :set -XMultiParamTypeClasses -XTypeOperators -XFlexibleInstances
10471044-- >>> import qualified Data.Vector.Unboxed as VU
1048- -- >>> import qualified Data.Vector.Unboxed.Mutable as VUM
10491045-- >>> import qualified Data.Vector.Generic as VG
10501046-- >>> import qualified Data.Vector.Generic.Mutable as VGM
10511047-- >>> import qualified Control.DeepSeq as NF
@@ -1059,7 +1055,7 @@ instance Unbox (DoNotUnboxStrict a)
10591055-- >>> {-# INLINE fromURepr #-}
10601056-- >>> newtype instance VU.MVector s (Baz a) = MV_Baz (VU.MVector s (Int, VU.DoNotUnboxNormalForm a))
10611057-- >>> newtype instance VU.Vector (Baz a) = V_Baz (VU.Vector (Int, VU.DoNotUnboxNormalForm a))
1062- -- >>> deriving via (Baz a `VU.As` (Int, VU.DoNotUnboxNormalForm a)) instance NF.NFData a => VGM.MVector VUM .MVector (Baz a)
1058+ -- >>> deriving via (Baz a `VU.As` (Int, VU.DoNotUnboxNormalForm a)) instance NF.NFData a => VGM.MVector VU .MVector (Baz a)
10631059-- >>> deriving via (Baz a `VU.As` (Int, VU.DoNotUnboxNormalForm a)) instance NF.NFData a => VG.Vector VU.Vector (Baz a)
10641060-- >>> instance NF.NFData a => VU.Unbox (Baz a)
10651061-- >>> :}
0 commit comments