basement 0.0.8 → 0.0.9
raw patch · 17 files changed
+124/−139 lines, 17 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Basement.Block: instance (Basement.Monad.PrimMonad prim, st ~ Basement.Monad.PrimState prim, Basement.PrimType.PrimType ty) => Basement.Alg.Class.RandomAccess (Basement.Block.Base.MutableBlock ty st) prim ty
- Basement.BoxedArray: instance (Basement.Monad.PrimMonad prim, st ~ Basement.Monad.PrimState prim) => Basement.Alg.Class.RandomAccess (Basement.BoxedArray.MArray ty st) prim ty
- Basement.Compat.Primitive: compatAndI# :: Int# -> Int# -> Int#
- Basement.Compat.Primitive: compatCopyAddrToByteArray# :: Addr# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s
- Basement.Compat.Primitive: compatCopyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s
- Basement.Compat.Primitive: compatGetSizeofMutableByteArray# :: MutableByteArray# s -> State# s -> (# State# s, Int# #)
- Basement.Compat.Primitive: compatQuotRemInt# :: Int# -> Int# -> (# Int#, Int# #)
- Basement.Compat.Primitive: compatResizeMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
- Basement.Compat.Primitive: compatShrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #)
- Basement.Exception: instance GHC.Exception.Exception Basement.Exception.InvalidRecast
- Basement.Exception: instance GHC.Exception.Exception Basement.Exception.NonEmptyCollectionIsEmpty
- Basement.Exception: instance GHC.Exception.Exception Basement.Exception.OutOfBound
- Basement.From: instance (Basement.PrimType.PrimType a, Basement.PrimType.PrimType b, GHC.TypeNats.KnownNat n, GHC.TypeNats.KnownNat m, (Basement.PrimType.PrimSize b GHC.TypeNats.* m) ~ (Basement.PrimType.PrimSize a GHC.TypeNats.* n)) => Basement.From.From (Basement.Sized.Block.BlockN n a) (Basement.Sized.Block.BlockN m b)
- Basement.From: instance Basement.From.From (GHC.Base.Maybe a) (Data.Either.Either () a)
- Basement.Monad: instance Basement.Monad.MonadFailure GHC.Base.Maybe
- Basement.NormalForm: instance Basement.NormalForm.NormalForm a => Basement.NormalForm.NormalForm (GHC.Base.Maybe a)
+ Basement.Bits: infixl 5 .|.
+ Basement.Bits: infixl 6 .^.
+ Basement.Bits: infixl 7 .&.
+ Basement.Bits: infixl 8 `rotateR`
+ Basement.Bits: instance Basement.Bits.BitOps GHC.Types.Word
+ Basement.Bits: instance Basement.Bits.FiniteBitsOps GHC.Types.Word
+ Basement.Block: instance (Basement.Monad.PrimMonad prim, st Data.Type.Equality.~ Basement.Monad.PrimState prim, Basement.PrimType.PrimType ty) => Basement.Alg.Class.RandomAccess (Basement.Block.Base.MutableBlock ty st) prim ty
+ Basement.Bounded: instance (GHC.TypeNats.KnownNat n, Basement.Nat.NatWithinBound GHC.Word.Word64 n) => Basement.Compat.NumLiteral.Integral (Basement.Bounded.Zn64 n)
+ Basement.Bounded: instance (GHC.TypeNats.KnownNat n, Basement.Nat.NatWithinBound GHC.Word.Word64 n) => Basement.Numerical.Number.IsIntegral (Basement.Bounded.Zn64 n)
+ Basement.Bounded: instance (GHC.TypeNats.KnownNat n, Basement.Nat.NatWithinBound GHC.Word.Word64 n) => Basement.Numerical.Number.IsNatural (Basement.Bounded.Zn64 n)
+ Basement.Bounded: instance GHC.TypeNats.KnownNat n => Basement.Compat.NumLiteral.Integral (Basement.Bounded.Zn n)
+ Basement.Bounded: instance GHC.TypeNats.KnownNat n => Basement.Numerical.Number.IsIntegral (Basement.Bounded.Zn n)
+ Basement.Bounded: instance GHC.TypeNats.KnownNat n => Basement.Numerical.Number.IsNatural (Basement.Bounded.Zn n)
+ Basement.BoxedArray: instance (Basement.Monad.PrimMonad prim, st Data.Type.Equality.~ Basement.Monad.PrimState prim) => Basement.Alg.Class.RandomAccess (Basement.BoxedArray.MArray ty st) prim ty
+ Basement.Compat.Base: -- structure <tt>l</tt>.
+ Basement.Compat.Base: -- | The <a>Item</a> type function returns the type of items of the
+ Basement.Compat.Base: infix 4 /=
+ Basement.Compat.Base: infixl 1 >>
+ Basement.Compat.IsList: -- structure <tt>l</tt>.
+ Basement.Compat.IsList: -- | The <a>Item</a> type function returns the type of items of the
+ Basement.Compat.Semigroup: infixr 6 <>
+ Basement.Exception: instance GHC.Exception.Type.Exception Basement.Exception.InvalidRecast
+ Basement.Exception: instance GHC.Exception.Type.Exception Basement.Exception.NonEmptyCollectionIsEmpty
+ Basement.Exception: instance GHC.Exception.Type.Exception Basement.Exception.OutOfBound
+ Basement.From: instance (Basement.PrimType.PrimType a, Basement.PrimType.PrimType b, GHC.TypeNats.KnownNat n, GHC.TypeNats.KnownNat m, (Basement.PrimType.PrimSize b GHC.TypeNats.* m) Data.Type.Equality.~ (Basement.PrimType.PrimSize a GHC.TypeNats.* n)) => Basement.From.From (Basement.Sized.Block.BlockN n a) (Basement.Sized.Block.BlockN m b)
+ Basement.From: instance Basement.From.From (GHC.Maybe.Maybe a) (Data.Either.Either () a)
+ Basement.From: instance Basement.From.From Basement.Types.Word128.Word128 Basement.Types.Word256.Word256
+ Basement.Imports: -- structure <tt>l</tt>.
+ Basement.Imports: -- | Generic representation type
+ Basement.Imports: infix 4 /=
+ Basement.Imports: infixl 1 >>
+ Basement.Imports: infixr 6 <>
+ Basement.Monad: -- can be encoded in this monad
+ Basement.Monad: -- | The associated type with the MonadFailure, representing what failure
+ Basement.Monad: instance Basement.Monad.MonadFailure GHC.Maybe.Maybe
+ Basement.Nat: infix 4 <=?
+ Basement.Nat: infixl 6 -
+ Basement.Nat: infixl 7 *
+ Basement.Nat: infixr 8 ^
+ Basement.Nat: type family NatWithinBound ty (n :: Nat)
+ Basement.NormalForm: instance Basement.NormalForm.NormalForm a => Basement.NormalForm.NormalForm (GHC.Maybe.Maybe a)
+ Basement.Numerical.Additive: infixl 6 +
+ Basement.Numerical.Multiplicative: infixl 7 /
+ Basement.Numerical.Multiplicative: infixr 8 ^
+ Basement.Numerical.Subtractive: infixl 6 -
+ Basement.PrimType: -- | type level size of the given <tt>ty</tt>
+ Basement.UArray: -- | type level size of the given <tt>ty</tt>
- Basement.Block: MutableBlock :: (MutableByteArray# st) -> MutableBlock ty st
+ Basement.Block: MutableBlock :: MutableByteArray# st -> MutableBlock ty st
- Basement.Block.Mutable: MutableBlock :: (MutableByteArray# st) -> MutableBlock ty st
+ Basement.Block.Mutable: MutableBlock :: MutableByteArray# st -> MutableBlock ty st
- Basement.Compat.Base: ($!) :: () => a -> b -> a -> b
+ Basement.Compat.Base: ($!) :: () => (a -> b) -> a -> b
- Basement.Compat.Base: ($) :: () => a -> b -> a -> b
+ Basement.Compat.Base: ($) :: () => (a -> b) -> a -> b
- Basement.Compat.Base: (<$>) :: Functor f => a -> b -> f a -> f b
+ Basement.Compat.Base: (<$>) :: Functor f => (a -> b) -> f a -> f b
- Basement.Compat.Base: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ Basement.Compat.Base: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- Basement.Compat.Base: (>>=) :: Monad m => m a -> a -> m b -> m b
+ Basement.Compat.Base: (>>=) :: Monad m => m a -> (a -> m b) -> m b
- Basement.Compat.Base: class Functor f => Applicative (f :: * -> *)
+ Basement.Compat.Base: class Functor f => Applicative (f :: Type -> Type)
- Basement.Compat.Base: class Functor (f :: * -> *)
+ Basement.Compat.Base: class Functor (f :: Type -> Type)
- Basement.Compat.Base: class Applicative m => Monad (m :: * -> *)
+ Basement.Compat.Base: class Applicative m => Monad (m :: Type -> Type)
- Basement.Compat.Base: dataCast1 :: (Data a, Typeable t) => forall d. Data d => c t d -> Maybe c a
+ Basement.Compat.Base: dataCast1 :: (Data a, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c a)
- Basement.Compat.Base: dataCast2 :: (Data a, Typeable t) => forall d e. (Data d, Data e) => c t d e -> Maybe c a
+ Basement.Compat.Base: dataCast2 :: (Data a, Typeable t) => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
- Basement.Compat.Base: either :: () => a -> c -> b -> c -> Either a b -> c
+ Basement.Compat.Base: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
- Basement.Compat.Base: flip :: () => a -> b -> c -> b -> a -> c
+ Basement.Compat.Base: flip :: () => (a -> b -> c) -> b -> a -> c
- Basement.Compat.Base: fmap :: Functor f => a -> b -> f a -> f b
+ Basement.Compat.Base: fmap :: Functor f => (a -> b) -> f a -> f b
- Basement.Compat.Base: gfoldl :: Data a => forall d b. Data d => c d -> b -> d -> c b -> forall g. () => g -> c g -> a -> c a
+ Basement.Compat.Base: gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> a -> c a
- Basement.Compat.Base: gmapM :: (Data a, Monad m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Compat.Base: gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Compat.Base: gmapMo :: (Data a, MonadPlus m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Compat.Base: gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Compat.Base: gmapMp :: (Data a, MonadPlus m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Compat.Base: gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Compat.Base: gmapQ :: Data a => forall d. Data d => d -> u -> a -> [u]
+ Basement.Compat.Base: gmapQ :: Data a => (forall d. Data d => d -> u) -> a -> [u]
- Basement.Compat.Base: gmapQi :: Data a => Int -> forall d. Data d => d -> u -> a -> u
+ Basement.Compat.Base: gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
- Basement.Compat.Base: gmapQl :: Data a => r -> r' -> r -> r -> forall d. Data d => d -> r' -> a -> r
+ Basement.Compat.Base: gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- Basement.Compat.Base: gmapQr :: Data a => r' -> r -> r -> r -> forall d. Data d => d -> r' -> a -> r
+ Basement.Compat.Base: gmapQr :: Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- Basement.Compat.Base: gmapT :: Data a => forall b. Data b => b -> b -> a -> a
+ Basement.Compat.Base: gmapT :: Data a => (forall b. Data b => b -> b) -> a -> a
- Basement.Compat.Base: gunfold :: Data a => forall b r. Data b => c b -> r -> c r -> forall r. () => r -> c r -> Constr -> c a
+ Basement.Compat.Base: gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. () => r -> c r) -> Constr -> c a
- Basement.Compat.Base: infixl 4 <$>
+ Basement.Compat.Base: infixl 4 <*
- Basement.Compat.Base: liftA2 :: Applicative f => a -> b -> c -> f a -> f b -> f c
+ Basement.Compat.Base: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- Basement.Compat.Base: maybe :: () => b -> a -> b -> Maybe a -> b
+ Basement.Compat.Base: maybe :: () => b -> (a -> b) -> Maybe a -> b
- Basement.Compat.Base: type family Item l :: *;
+ Basement.Compat.Base: type family Item l :: Type;
- Basement.Compat.Bifunctor: bimap :: Bifunctor p => a -> b -> c -> d -> p a c -> p b d
+ Basement.Compat.Bifunctor: bimap :: Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
- Basement.Compat.Bifunctor: class Bifunctor (p :: * -> * -> *)
+ Basement.Compat.Bifunctor: class Bifunctor (p :: Type -> Type -> Type)
- Basement.Compat.Bifunctor: first :: Bifunctor p => a -> b -> p a c -> p b c
+ Basement.Compat.Bifunctor: first :: Bifunctor p => (a -> b) -> p a c -> p b c
- Basement.Compat.Bifunctor: second :: Bifunctor p => b -> c -> p a b -> p a c
+ Basement.Compat.Bifunctor: second :: Bifunctor p => (b -> c) -> p a b -> p a c
- Basement.Compat.IsList: type family Item l :: *;
+ Basement.Compat.IsList: type family Item l :: Type;
- Basement.Compat.MonadTrans: Reader :: r -> m a -> Reader r m a
+ Basement.Compat.MonadTrans: Reader :: (r -> m a) -> Reader r m a
- Basement.Compat.MonadTrans: State :: s -> m (a, s) -> State s m a
+ Basement.Compat.MonadTrans: State :: (s -> m (a, s)) -> State s m a
- Basement.FinalPtr: FinalForeign :: (ForeignPtr a) -> FinalPtr a
+ Basement.FinalPtr: FinalForeign :: ForeignPtr a -> FinalPtr a
- Basement.FinalPtr: FinalPtr :: (Ptr a) -> FinalPtr a
+ Basement.FinalPtr: FinalPtr :: Ptr a -> FinalPtr a
- Basement.Imports: ($!) :: () => a -> b -> a -> b
+ Basement.Imports: ($!) :: () => (a -> b) -> a -> b
- Basement.Imports: ($) :: () => a -> b -> a -> b
+ Basement.Imports: ($) :: () => (a -> b) -> a -> b
- Basement.Imports: (<$>) :: Functor f => a -> b -> f a -> f b
+ Basement.Imports: (<$>) :: Functor f => (a -> b) -> f a -> f b
- Basement.Imports: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ Basement.Imports: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- Basement.Imports: (>>=) :: Monad m => m a -> a -> m b -> m b
+ Basement.Imports: (>>=) :: Monad m => m a -> (a -> m b) -> m b
- Basement.Imports: class Functor f => Applicative (f :: * -> *)
+ Basement.Imports: class Functor f => Applicative (f :: Type -> Type)
- Basement.Imports: class Functor (f :: * -> *)
+ Basement.Imports: class Functor (f :: Type -> Type)
- Basement.Imports: class Applicative m => Monad (m :: * -> *)
+ Basement.Imports: class Applicative m => Monad (m :: Type -> Type)
- Basement.Imports: dataCast1 :: (Data a, Typeable t) => forall d. Data d => c t d -> Maybe c a
+ Basement.Imports: dataCast1 :: (Data a, Typeable t) => (forall d. Data d => c (t d)) -> Maybe (c a)
- Basement.Imports: dataCast2 :: (Data a, Typeable t) => forall d e. (Data d, Data e) => c t d e -> Maybe c a
+ Basement.Imports: dataCast2 :: (Data a, Typeable t) => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)
- Basement.Imports: either :: () => a -> c -> b -> c -> Either a b -> c
+ Basement.Imports: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
- Basement.Imports: flip :: () => a -> b -> c -> b -> a -> c
+ Basement.Imports: flip :: () => (a -> b -> c) -> b -> a -> c
- Basement.Imports: fmap :: Functor f => a -> b -> f a -> f b
+ Basement.Imports: fmap :: Functor f => (a -> b) -> f a -> f b
- Basement.Imports: gfoldl :: Data a => forall d b. Data d => c d -> b -> d -> c b -> forall g. () => g -> c g -> a -> c a
+ Basement.Imports: gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. () => g -> c g) -> a -> c a
- Basement.Imports: gmapM :: (Data a, Monad m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Imports: gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Imports: gmapMo :: (Data a, MonadPlus m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Imports: gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Imports: gmapMp :: (Data a, MonadPlus m) => forall d. Data d => d -> m d -> a -> m a
+ Basement.Imports: gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
- Basement.Imports: gmapQ :: Data a => forall d. Data d => d -> u -> a -> [u]
+ Basement.Imports: gmapQ :: Data a => (forall d. Data d => d -> u) -> a -> [u]
- Basement.Imports: gmapQi :: Data a => Int -> forall d. Data d => d -> u -> a -> u
+ Basement.Imports: gmapQi :: Data a => Int -> (forall d. Data d => d -> u) -> a -> u
- Basement.Imports: gmapQl :: Data a => r -> r' -> r -> r -> forall d. Data d => d -> r' -> a -> r
+ Basement.Imports: gmapQl :: Data a => (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- Basement.Imports: gmapQr :: Data a => r' -> r -> r -> r -> forall d. Data d => d -> r' -> a -> r
+ Basement.Imports: gmapQr :: Data a => (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r
- Basement.Imports: gmapT :: Data a => forall b. Data b => b -> b -> a -> a
+ Basement.Imports: gmapT :: Data a => (forall b. Data b => b -> b) -> a -> a
- Basement.Imports: gunfold :: Data a => forall b r. Data b => c b -> r -> c r -> forall r. () => r -> c r -> Constr -> c a
+ Basement.Imports: gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. () => r -> c r) -> Constr -> c a
- Basement.Imports: infixl 4 <$>
+ Basement.Imports: infixl 4 <*
- Basement.Imports: liftA2 :: Applicative f => a -> b -> c -> f a -> f b -> f c
+ Basement.Imports: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- Basement.Imports: maybe :: () => b -> a -> b -> Maybe a -> b
+ Basement.Imports: maybe :: () => b -> (a -> b) -> Maybe a -> b
- Basement.Imports: type family Rep a :: * -> *;
+ Basement.Imports: type family Rep a :: Type -> Type;
- Basement.MutableBuilder: BuildingState :: [collection] -> !(CountOf step) -> mutCollection state -> !(CountOf step) -> BuildingState collection mutCollection step state
+ Basement.MutableBuilder: BuildingState :: [collection] -> !CountOf step -> mutCollection state -> !CountOf step -> BuildingState collection mutCollection step state
- Basement.MutableBuilder: [chunkSize] :: BuildingState collection mutCollection step state -> !(CountOf step)
+ Basement.MutableBuilder: [chunkSize] :: BuildingState collection mutCollection step state -> !CountOf step
- Basement.MutableBuilder: [prevChunksSize] :: BuildingState collection mutCollection step state -> !(CountOf step)
+ Basement.MutableBuilder: [prevChunksSize] :: BuildingState collection mutCollection step state -> !CountOf step
- Basement.Numerical.Additive: scale :: (Additive a, IsNatural n) => n -> a -> a
+ Basement.Numerical.Additive: scale :: (Additive a, Enum n, IsNatural n) => n -> a -> a
- Basement.Numerical.Multiplicative: (^) :: (Multiplicative a, IsNatural n, IDivisible n) => a -> n -> a
+ Basement.Numerical.Multiplicative: (^) :: (Multiplicative a, IsNatural n, Enum n, IDivisible n) => a -> n -> a
- Basement.Numerical.Number: class (Enum a, Eq a, Ord a, Integral a) => IsIntegral a
+ Basement.Numerical.Number: class (Integral a, Eq a, Ord a) => IsIntegral a
- Basement.Numerical.Number: class (Enum a, Eq a, Ord a, Integral a, IsIntegral a) => IsNatural a
+ Basement.Numerical.Number: class IsIntegral a => IsNatural a
- Basement.Sized.Block: cast :: forall n m a b. (PrimType a, PrimType b, KnownNat n, KnownNat m, ((PrimSize b) * m) ~ ((PrimSize a) * n)) => BlockN n a -> BlockN m b
+ Basement.Sized.Block: cast :: forall n m a b. (PrimType a, PrimType b, KnownNat n, KnownNat m, (PrimSize b * m) ~ (PrimSize a * n)) => BlockN n a -> BlockN m b
- Basement.Sized.Block: intersperse :: (CmpNat n 1 ~ 'GT, PrimType ty) => ty -> BlockN n ty -> BlockN (n + n - 1) ty
+ Basement.Sized.Block: intersperse :: (CmpNat n 1 ~ 'GT, PrimType ty) => ty -> BlockN n ty -> BlockN ((n + n) - 1) ty
- Basement.Sized.Block: mutableCast :: forall n m a b st. (PrimType a, PrimType b, KnownNat n, KnownNat m, ((PrimSize b) * m) ~ ((PrimSize a) * n)) => MutableBlockN n a st -> MutableBlockN m b st
+ Basement.Sized.Block: mutableCast :: forall n m a b st. (PrimType a, PrimType b, KnownNat n, KnownNat m, (PrimSize b * m) ~ (PrimSize a * n)) => MutableBlockN n a st -> MutableBlockN m b st
- Basement.Sized.List: foldl1' :: (1 <= n) => (a -> a -> a) -> ListN n a -> a
+ Basement.Sized.List: foldl1' :: 1 <= n => (a -> a -> a) -> ListN n a -> a
- Basement.Sized.List: foldr1 :: (1 <= n) => (a -> a -> a) -> ListN n a -> a
+ Basement.Sized.List: foldr1 :: 1 <= n => (a -> a -> a) -> ListN n a -> a
- Basement.Sized.List: head :: (1 <= n) => ListN n a -> a
+ Basement.Sized.List: head :: 1 <= n => ListN n a -> a
- Basement.Sized.List: init :: (1 <= n) => ListN n a -> ListN (n - 1) a
+ Basement.Sized.List: init :: 1 <= n => ListN n a -> ListN (n - 1) a
- Basement.Sized.List: tail :: (1 <= n) => ListN n a -> ListN (n - 1) a
+ Basement.Sized.List: tail :: 1 <= n => ListN n a -> ListN (n - 1) a
- Basement.Sized.List: uncons :: (1 <= n) => ListN n a -> (a, ListN (n - 1) a)
+ Basement.Sized.List: uncons :: 1 <= n => ListN n a -> (a, ListN (n - 1) a)
- Basement.Sized.List: unsnoc :: (1 <= n) => ListN n a -> (ListN (n - 1) a, a)
+ Basement.Sized.List: unsnoc :: 1 <= n => ListN n a -> (ListN (n - 1) a, a)
- Basement.Sized.UVect: intersperse :: (CmpNat n 1 ~ 'GT, PrimType ty) => ty -> UVect n ty -> UVect (n + n - 1) ty
+ Basement.Sized.UVect: intersperse :: (CmpNat n 1 ~ 'GT, PrimType ty) => ty -> UVect n ty -> UVect ((n + n) - 1) ty
- Basement.Sized.Vect: intersperse :: (CmpNat n 1 ~ 'GT) => ty -> Vect n ty -> Vect (n + n - 1) ty
+ Basement.Sized.Vect: intersperse :: CmpNat n 1 ~ 'GT => ty -> Vect n ty -> Vect ((n + n) - 1) ty
- Basement.String: MutableString :: (MUArray Word8 st) -> MutableString st
+ Basement.String: MutableString :: MUArray Word8 st -> MutableString st
- Basement.String: String :: (UArray Word8) -> String
+ Basement.String: String :: UArray Word8 -> String
- Basement.Types.AsciiString: MutableAsciiString :: (MUArray Char7 st) -> MutableAsciiString st
+ Basement.Types.AsciiString: MutableAsciiString :: MUArray Char7 st -> MutableAsciiString st
- Basement.UArray: UArray :: {-# UNPACK #-} !(Offset ty) -> {-# UNPACK #-} !(CountOf ty) -> !(UArrayBackend ty) -> UArray ty
+ Basement.UArray: UArray :: {-# UNPACK #-} !Offset ty -> {-# UNPACK #-} !CountOf ty -> !UArrayBackend ty -> UArray ty
- Basement.UArray.Mutable: MUArray :: {-# UNPACK #-} !(Offset ty) -> {-# UNPACK #-} !(CountOf ty) -> !(MUArrayBackend ty st) -> MUArray ty st
+ Basement.UArray.Mutable: MUArray :: {-# UNPACK #-} !Offset ty -> {-# UNPACK #-} !CountOf ty -> !MUArrayBackend ty st -> MUArray ty st
Files
- Basement/Bits.hs +57/−2
- Basement/Block.hs +1/−1
- Basement/Block/Base.hs +2/−2
- Basement/Block/Mutable.hs +1/−2
- Basement/Bounded.hs +19/−0
- Basement/Compat/Primitive.hs +8/−108
- Basement/From.hs +3/−0
- Basement/Numerical/Additive.hs +9/−4
- Basement/Numerical/Multiplicative.hs +4/−3
- Basement/Numerical/Number.hs +3/−2
- Basement/Types/OffsetSize.hs +1/−0
- Basement/UArray.hs +1/−1
- Basement/UArray/Base.hs +2/−2
- Basement/UArray/Mutable.hs +1/−1
- basement.cabal +4/−3
- cbits/basement_rts.c +8/−0
- cbits/foundation_rts.c +0/−8
Basement/Bits.hs view
@@ -24,7 +24,6 @@ module Basement.Bits ( BitOps(..) , FiniteBitsOps(..)- , Bits , toBits , allOne@@ -57,7 +56,7 @@ import GHC.IntWord64 #endif --- | operation over finit bits+-- | operation over finite bits class FiniteBitsOps bits where -- | get the number of bits in the given object --@@ -123,6 +122,11 @@ default clearBit :: FiniteBitsOps bits => bits -> Offset Bool -> bits clearBit x n = x .&. (bitFlip (bit n)) +infixl 8 .<<., .>>., `rotateL`, `rotateR`+infixl 7 .&.+infixl 6 .^.+infixl 5 .|.+ -- | Bool set of 'n' bits. -- newtype Bits (n :: Nat) = Bits { bitsToNatural :: Natural }@@ -162,6 +166,7 @@ instance SizeValid n => Additive (Bits n) where azero = Bits 0 (+) (Bits a) (Bits b) = toBits (a + b)+ scale n (Bits a) = toBits (scale n a) instance SizeValid n => Subtractive (Bits n) where type Difference (Bits n) = Bits n (-) (Bits a) (Bits b) = maybe azero toBits (a - b)@@ -309,6 +314,56 @@ (W32# x#) .^. (W32# y#) = W32# (x# `xor#` y#) (W32# x#) .<<. (CountOf (I# i#)) = W32# (narrow32Word# (x# `shiftL#` i#)) (W32# x#) .>>. (CountOf (I# i#)) = W32# (narrow32Word# (x# `shiftRL#` i#))++-- Word ---------------------------------------------------------------------++#if WORD_SIZE_IN_BITS == 64+instance FiniteBitsOps Word where+ numberOfBits _ = 64+ rotateL (W# x#) (CountOf (I# i#))+ | isTrue# (i'# ==# 0#) = W# x#+ | otherwise = W# ((x# `uncheckedShiftL#` i'#) `or#`+ (x# `uncheckedShiftRL#` (64# -# i'#)))+ where+ !i'# = word2Int# (int2Word# i# `and#` 63##)+ rotateR (W# x#) (CountOf (I# i#))+ | isTrue# (i'# ==# 0#) = W# x#+ | otherwise = W# ((x# `uncheckedShiftRL#` i'#) `or#`+ (x# `uncheckedShiftL#` (64# -# i'#)))+ where+ !i'# = word2Int# (int2Word# i# `and#` 63##)+ bitFlip (W# x#) = W# (x# `xor#` mb#)+ where !(W# mb#) = maxBound+ popCount (W# x#) = CountOf $ wordToInt (W# (popCnt64# x#))+ countLeadingZeros (W# w#) = CountOf $ wordToInt (W# (clz64# w#))+ countTrailingZeros (W# w#) = CountOf $ wordToInt (W# (ctz64# w#))+#else+ numberOfBits _ = 32+ rotateL (W# x#) (CountOf (I# i#))+ | isTrue# (i'# ==# 0#) = W# x#+ | otherwise = W# (narrow32Word# ((x# `uncheckedShiftL#` i'#) `or#`+ (x# `uncheckedShiftRL#` (32# -# i'#))))+ where+ !i'# = word2Int# (int2Word# i# `and#` 31##)+ rotateR (W# x#) (CountOf (I# i#))+ | isTrue# (i'# ==# 0#) = W# x#+ | otherwise = W# ((x# `uncheckedShiftRL#` i'#) `or#`+ (x# `uncheckedShiftL#` (32# -# i'#)))+ where+ !i'# = word2Int# (int2Word# i# `and#` 31##)+ bitFlip (W# x#) = W# (x# `xor#` mb#)+ where !(W# mb#) = maxBound+ popCount (W# x#) = CountOf $ wordToInt (W# (popCnt32# x#))+ countLeadingZeros (W# w#) = CountOf $ wordToInt (W# (clz32# w#))+ countTrailingZeros (W# w#) = CountOf $ wordToInt (W# (ctz32# w#))+#endif++instance BitOps Word where+ (W# x#) .&. (W# y#) = W# (x# `and#` y#)+ (W# x#) .|. (W# y#) = W# (x# `or#` y#)+ (W# x#) .^. (W# y#) = W# (x# `xor#` y#)+ (W# x#) .<<. (CountOf (I# i#)) = W# ((x# `shiftL#` i#))+ (W# x#) .>>. (CountOf (I# i#)) = W# ((x# `shiftRL#` i#)) -- Word64 ---------------------------------------------------------------------
Basement/Block.hs view
@@ -107,7 +107,7 @@ -> Ptr ty -- ^ The destination address where the copy is going to start -> prim () unsafeCopyToPtr (Block blk) (Ptr p) = primitive $ \s1 ->- (# compatCopyByteArrayToAddr# blk 0# p (sizeofByteArray# blk) s1, () #)+ (# copyByteArrayToAddr# blk 0# p (sizeofByteArray# blk) s1, () #) -- | Create a new array of size @n by settings each cells through the -- function @f.
Basement/Block/Base.hs view
@@ -265,8 +265,8 @@ unsafeShrink :: PrimMonad prim => MutableBlock ty (PrimState prim) -> CountOf ty -> prim (MutableBlock ty (PrimState prim)) unsafeShrink (MutableBlock mba) (CountOf (I# nsz)) = primitive $ \s ->- case compatShrinkMutableByteArray# mba nsz s of- (# s, mba' #) -> (# s, MutableBlock mba' #)+ case shrinkMutableByteArray# mba nsz s of+ s -> (# s, MutableBlock mba #) -- | Thaw an immutable block. --
Basement/Block/Mutable.hs view
@@ -67,7 +67,6 @@ import GHC.Prim import GHC.Types import Basement.Compat.Base-import Basement.Compat.Primitive (compatCopyByteArrayToAddr#) import Data.Proxy import Basement.Exception import Basement.Types.OffsetSize@@ -147,7 +146,7 @@ | srcEnd > sizeAsOffset arrSz = primOutOfBound OOB_MemCopy srcEnd arrSz | otherwise = do (Block ba) <- unsafeFreeze mb- primitive $ \s1 -> (# compatCopyByteArrayToAddr# ba os# dst# szBytes# s1, () #)+ primitive $ \s1 -> (# copyByteArrayToAddr# ba os# dst# szBytes# s1, () #) where srcEnd = os `offsetPlusE` arrSz !os@(Offset (I# os#)) = offsetInBytes ofs
Basement/Bounded.hs view
@@ -26,6 +26,7 @@ import Data.Word import Basement.Compat.Base import Basement.Compat.Natural+import Basement.Numerical.Number import Data.Proxy import Basement.Nat import qualified Prelude@@ -43,6 +44,15 @@ negate _ = error "cannot negate Zn64: use Foundation Numerical hierarchy for this function to not be exposed to Zn64" signum (Zn64 a) = Zn64 (Prelude.signum a) +type instance NatNumMaxBound (Zn64 n) = n++instance (KnownNat n, NatWithinBound Word64 n) => Integral (Zn64 n) where+ fromInteger = zn64 . Prelude.fromInteger+instance (KnownNat n, NatWithinBound Word64 n) => IsIntegral (Zn64 n) where+ toInteger (Zn64 n) = toInteger n+instance (KnownNat n, NatWithinBound Word64 n) => IsNatural (Zn64 (n :: Nat)) where+ toNatural (Zn64 n) = toNatural n+ -- | Create an element of ℤ/nℤ from a Word64 -- -- If the value is greater than n, then the value is normalized by using the@@ -80,6 +90,15 @@ abs a = a negate _ = error "cannot negate Zn: use Foundation Numerical hierarchy for this function to not be exposed to Zn" signum = Zn . Prelude.signum . unZn++type instance NatNumMaxBound (Zn n) = n++instance KnownNat n => Integral (Zn n) where+ fromInteger = zn . Prelude.fromInteger+instance KnownNat n => IsIntegral (Zn n) where+ toInteger (Zn n) = toInteger n+instance KnownNat n => IsNatural (Zn n) where+ toNatural i = unZn i -- | Create an element of ℤ/nℤ from a Natural. --
Basement/Compat/Primitive.hs view
@@ -12,14 +12,7 @@ module Basement.Compat.Primitive ( bool# , PinnedStatus(..), toPinnedStatus#- , compatAndI#- , compatQuotRemInt#- , compatCopyAddrToByteArray#- , compatCopyByteArrayToAddr# , compatMkWeak#- , compatGetSizeofMutableByteArray#- , compatShrinkMutableByteArray#- , compatResizeMutableByteArray# , compatIsByteArrayPinned# , compatIsMutableByteArrayPinned# , Word(..)@@ -29,17 +22,21 @@ import GHC.Exts import GHC.Prim import GHC.Word-#if __GLASGOW_HASKELL__ >= 800 import GHC.IO-#endif import Basement.Compat.PrimTypes +-- GHC 8.6 | Base 4.12+-- GHC 8.4 | Base 4.11+-- GHC 8.2 | Base 4.10 -- GHC 8.0 | Base 4.9 -- GHC 7.10 | Base 4.8 -- GHC 7.8 | Base 4.7 -- GHC 7.6 | Base 4.6 -- GHC 7.4 | Base 4.5+--+-- More complete list:+-- https://wiki.haskell.org/Base_package -- | Flag record whether a specific byte array is pinned or not data PinnedStatus = Pinned | Unpinned@@ -50,66 +47,10 @@ toPinnedStatus# _ = Pinned -- | turn an Int# into a Bool------ Since GHC 7.8, boolean primitive don't return Bool but Int#.-#if MIN_VERSION_base(4,7,0) bool# :: Int# -> Prelude.Bool bool# v = isTrue# v-#else-bool# :: Prelude.Bool -> Prelude.Bool-bool# v = v-#endif {-# INLINE bool# #-} --- | A version friendly of andI#-compatAndI# :: Int# -> Int# -> Int#-#if !MIN_VERSION_base(4,7,0)-compatAndI# a b = word2Int# (and# (int2Word# a) (int2Word# b))-#else-compatAndI# = andI#-#endif-{-# INLINE compatAndI# #-}---- | A version friendly of quotRemInt#-compatQuotRemInt# :: Int# -> Int# -> (# Int#, Int# #)-compatQuotRemInt# = quotRemInt#-{-# INLINE compatQuotRemInt# #-}---- | A version friendly fo copyAddrToByteArray#------ only available from GHC 7.8-compatCopyAddrToByteArray# :: Addr# -> MutableByteArray# s -> Int# -> Int# -> State# s -> State# s-#if MIN_VERSION_base(4,7,0)-compatCopyAddrToByteArray# = copyAddrToByteArray#-#else-compatCopyAddrToByteArray# addr ba ofs sz stini =- loop ofs 0# stini- where- loop o i st- | bool# (i ==# sz) = st- | Prelude.otherwise =- case readWord8OffAddr# addr i st of- (# st2, w #) -> loop (o +# 1#) (i +# 1#) (writeWord8Array# ba o w st2)-#endif-{-# INLINE compatCopyAddrToByteArray# #-}---- | A version friendly fo copyByteArrayToAddr#------ only available from GHC 7.8-compatCopyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s -> State# s-#if MIN_VERSION_base(4,7,0)-compatCopyByteArrayToAddr# = copyByteArrayToAddr#-#else-compatCopyByteArrayToAddr# ba ofs addr sz stini =- loop ofs 0# stini- where- loop o i st- | bool# (i ==# sz) = st- | Prelude.otherwise =- loop (o +# 1#) (i +# 1#) (writeWord8OffAddr# addr i (indexWord8Array# ba o) st)-#endif-{-# INLINE compatCopyByteArrayToAddr# #-}- -- | A mkWeak# version that keep working on 8.0 -- -- signature change in ghc-prim:@@ -117,50 +58,9 @@ -- * 0.5 :mkWeak# :: o -> b -> (State# RealWorld -> (#State# RealWorld, c#)) -> State# RealWorld -> (#State# RealWorld, Weak# b#) -- compatMkWeak# :: o -> b -> Prelude.IO () -> State# RealWorld -> (#State# RealWorld, Weak# b #)-#if __GLASGOW_HASKELL__ >= 800 compatMkWeak# o b c s = mkWeak# o b (case c of { IO f -> f }) s-#else-compatMkWeak# o b c s = mkWeak# o b c s-#endif {-# INLINE compatMkWeak# #-} -compatGetSizeofMutableByteArray# :: MutableByteArray# s -> State# s -> (#State# s, Int# #)-#if __GLASGOW_HASKELL__ >= 800-compatGetSizeofMutableByteArray# mba s = getSizeofMutableByteArray# mba s-#else-compatGetSizeofMutableByteArray# mba s = (# s, sizeofMutableByteArray# mba #)-#endif-{-# INLINE compatGetSizeofMutableByteArray# #-}--compatShrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #)-#if __GLASGOW_HASKELL__ >= 800-compatShrinkMutableByteArray# mba i s =- case shrinkMutableByteArray# mba i s of { s2 -> (# s2, mba #) }-#else-compatShrinkMutableByteArray# src i s =- -- not check whether i is smaller than the size of the buffer- case newAlignedPinnedByteArray# i 8# s of { (# s2, dst #) ->- case copyMutableByteArray# src 0# dst 0# i s2 of { s3 -> (# s3, dst #) }}-#endif-{-# INLINE compatShrinkMutableByteArray# #-}----shrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> State# s-compatResizeMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, MutableByteArray# s #)-#if __GLASGOW_HASKELL__ >= 800-compatResizeMutableByteArray# mba i s = resizeMutableByteArray# mba i s-#else-compatResizeMutableByteArray# src i s =- case newAlignedPinnedByteArray# i 8# s of { (# s2, dst #) ->- case copyMutableByteArray# src 0# dst 0# nbBytes s2 of { s3 -> (# s3, dst #) }}- where- isGrow = bool# (i ># len)- nbBytes- | isGrow = len- | Prelude.otherwise = i- !len = sizeofMutableByteArray# src-#endif-{-# INLINE compatResizeMutableByteArray# #-}- #if __GLASGOW_HASKELL__ >= 802 compatIsByteArrayPinned# :: ByteArray# -> Pinned# compatIsByteArrayPinned# ba = isByteArrayPinned# ba@@ -168,9 +68,9 @@ compatIsMutableByteArrayPinned# :: MutableByteArray# s -> Pinned# compatIsMutableByteArrayPinned# ba = isMutableByteArrayPinned# ba #else-foreign import ccall unsafe "foundation_is_bytearray_pinned"+foreign import ccall unsafe "basement_is_bytearray_pinned" compatIsByteArrayPinned# :: ByteArray# -> Pinned# -foreign import ccall unsafe "foundation_is_bytearray_pinned"+foreign import ccall unsafe "basement_is_bytearray_pinned" compatIsMutableByteArrayPinned# :: MutableByteArray# s -> Pinned# #endif
Basement/From.hs view
@@ -213,6 +213,9 @@ from (Left a) = This a from (Right b) = That b +instance From Word128 Word256 where+ from (Word128 a b) = Word256 0 0 a b+ -- basement instances -- uarrays
Basement/Numerical/Additive.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE DefaultSignatures #-} {-# OPTIONS_GHC -fno-prof-auto #-} module Basement.Numerical.Additive ( Additive(..)@@ -41,10 +42,14 @@ (+) :: a -> a -> a -- the addition scale :: IsNatural n => n -> a -> a -- scale: repeated addition- scale 0 _ = azero- scale 1 a = a- scale 2 a = a + a- scale n a = a + scale (pred n) a -- TODO optimise. define by group of 2.+ default scale :: (Enum n, IsNatural n) => n -> a -> a+ scale = scaleEnum++scaleEnum :: (Enum n, IsNatural n, Additive a) => n -> a -> a+scaleEnum 0 _ = azero+scaleEnum 1 a = a+scaleEnum 2 a = a + a+scaleEnum n a = a + scaleEnum (pred n) a -- TODO optimise. define by group of 2. infixl 6 +
Basement/Numerical/Multiplicative.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE DefaultSignatures #-} module Basement.Numerical.Multiplicative ( Multiplicative(..) , IDivisible(..)@@ -10,6 +11,7 @@ import Basement.Compat.Base import Basement.Compat.C.Types import Basement.Compat.Natural+import Basement.Compat.NumLiteral import Basement.Numerical.Number import Basement.Numerical.Additive import Basement.Types.Word128 (Word128)@@ -35,8 +37,7 @@ -- > a ^ 2 = a * a -- > a ^ 10 = (a ^ 5) * (a ^ 5) .. --(^) :: (IsNatural n) => a -> n -> a- (^) :: (IsNatural n, IDivisible n) => a -> n -> a- -- default (^) :: (IDivisible n, IsNatural n, Multiplicative a) => a -> n -> a+ (^) :: (IsNatural n, Enum n, IDivisible n) => a -> n -> a (^) = power -- | Represent types that supports an euclidian division@@ -310,7 +311,7 @@ recip :: Divisible a => a -> a recip x = midentity / x -power :: (IsNatural n, IDivisible n, Multiplicative a) => a -> n -> a+power :: (Enum n, IsNatural n, IDivisible n, Multiplicative a) => a -> n -> a power a n | n == 0 = midentity | otherwise = squaring midentity a n
Basement/Numerical/Number.hs view
@@ -7,6 +7,7 @@ import Basement.Compat.Base import Basement.Compat.C.Types import Basement.Compat.Natural+import Basement.Compat.NumLiteral import Data.Bits import qualified Prelude @@ -14,12 +15,12 @@ -- -- all number are Enum'erable, meaning that you can move to -- next element-class (Enum a, Eq a, Ord a, Integral a) => IsIntegral a where+class (Integral a, Eq a, Ord a) => IsIntegral a where {-# MINIMAL toInteger #-} toInteger :: a -> Integer -- | Non Negative Number literals, convertible through the generic Natural type-class (Enum a, Eq a, Ord a, Integral a, IsIntegral a) => IsNatural a where+class IsIntegral a => IsNatural a where {-# MINIMAL toNatural #-} toNatural :: a -> Natural
Basement/Types/OffsetSize.hs view
@@ -197,6 +197,7 @@ instance Additive (CountOf ty) where azero = CountOf 0 (+) (CountOf a) (CountOf b) = CountOf (a+b)+ scale n (CountOf a) = CountOf (scale n a) instance Subtractive (CountOf ty) where type Difference (CountOf ty) = Maybe (CountOf ty)
Basement/UArray.hs view
@@ -301,7 +301,7 @@ where !(Offset os@(I# os#)) = offsetInBytes $ offset arr !(CountOf szBytes@(I# szBytes#)) = sizeInBytes $ length arr- copyBa (Block ba) = primitive $ \s1 -> (# compatCopyByteArrayToAddr# ba os# dst# szBytes# s1, () #)+ copyBa (Block ba) = primitive $ \s1 -> (# copyByteArrayToAddr# ba os# dst# szBytes# s1, () #) copyPtr fptr = unsafePrimFromIO $ withFinalPtr fptr $ \ptr -> copyBytes dst (ptr `plusPtr` os) szBytes -- | Get a Ptr pointing to the data in the UArray.
Basement/UArray/Base.hs view
@@ -533,7 +533,7 @@ copyAt (MUArray dstStart _ (MUArrayMBA (MutableBlock dstMba))) ed (MUArray srcStart _ (MUArrayAddr srcFptr)) es n = withFinalPtr srcFptr $ \srcPtr -> let !(Ptr srcAddr) = srcPtr `plusPtr` os- in primitive $ \s -> (# compatCopyAddrToByteArray# srcAddr dstMba od nBytes s, () #)+ in primitive $ \s -> (# copyAddrToByteArray# srcAddr dstMba od nBytes s, () #) where !sz = primSizeInBytes (Proxy :: Proxy ty) !(Offset os) = offsetOfE sz (srcStart + es)@@ -569,7 +569,7 @@ unsafeCopyAtRO (MUArray dstStart _ (MUArrayMBA (MutableBlock dstMba))) ed (UArray srcStart _ (UArrayAddr srcFptr)) es n = withFinalPtr srcFptr $ \srcPtr -> let !(Ptr srcAddr) = srcPtr `plusPtr` os- in primitive $ \s -> (# compatCopyAddrToByteArray# srcAddr dstMba od nBytes s, () #)+ in primitive $ \s -> (# copyAddrToByteArray# srcAddr dstMba od nBytes s, () #) where sz = primSizeInBytes (Proxy :: Proxy ty) !(Offset os) = offsetOfE sz (srcStart+es)
Basement/UArray/Mutable.hs view
@@ -169,7 +169,7 @@ where copyNative (MutableBlock mba) = primitive $ \s1 -> case unsafeFreezeByteArray# mba s1 of- (# s2, ba #) -> (# compatCopyByteArrayToAddr# ba os# dst# szBytes# s2, () #)+ (# s2, ba #) -> (# copyByteArrayToAddr# ba os# dst# szBytes# s2, () #) copyPtr fptr = unsafePrimFromIO $ withFinalPtr fptr $ \ptr -> copyBytes dst (ptr `plusPtr` os) szBytes
basement.cabal view
@@ -1,5 +1,5 @@ name: basement-version: 0.0.8+version: 0.0.9 synopsis: Foundation scrap box of array & string description: Foundation most basic primitives without any dependencies license: BSD3@@ -12,7 +12,7 @@ homepage: https://github.com/haskell-foundation/foundation#readme bug-reports: https://github.com/haskell-foundation/foundation/issues cabal-version: >=1.10-extra-source-files: cbits/*.h+extra-source-files: cbits/*.h cbits/basement_rts.c source-repository head type: git@@ -157,4 +157,5 @@ cpp-options: -DARCH_IS_UNKNOWN_ENDIAN include-dirs: cbits c-sources: cbits/foundation_mem.c- cbits/foundation_rts.c+ if impl(ghc < 8.2)+ c-sources: cbits/basement_rts.c
+ cbits/basement_rts.c view
@@ -0,0 +1,8 @@+#include "Rts.h"++#if __GLASGOW_HASKELL__ < 802+int basement_is_bytearray_pinned(void *p)+{+ return Bdescr((StgPtr) p)->flags & BF_PINNED;+}+#endif
− cbits/foundation_rts.c
@@ -1,8 +0,0 @@-#include "Rts.h"--#if __GLASGOW_HASKELL__ < 802-int foundation_is_bytearray_pinned(void *p)-{- return Bdescr((StgPtr) p)->flags & BF_PINNED;-}-#endif