Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- module Data.PrimitiveArray.Index.Class
- data family Vector a :: Type
- data family MVector s a :: Type
- data family LimitType i :: *
- newtype BitSet t = BitSet {}
- bitSet :: forall t t. Iso (BitSet t) (BitSet t) Int Int
- data family Vector a :: Type
- data family MVector s a :: Type
- data family LimitType i :: *
- data BitSet1 i ioc = BitSet1 {}
- bitset :: forall i ioc. Lens' (BitSet1 i ioc) (BitSet ioc)
- boundary :: forall i ioc i. Lens (BitSet1 i ioc) (BitSet1 i ioc) (Boundary i ioc) (Boundary i ioc)
- module Data.PrimitiveArray.Index.BitSetClasses
- module Data.PrimitiveArray.Index.Int
- module Data.PrimitiveArray.Index.IOC
- data family Vector a :: Type
- data family MVector s a :: Type
- data family LimitType i :: *
- newtype PInt (ioc :: k) (p :: k) = PInt {}
- pIntI :: Int -> PInt I p
- pIntO :: Int -> PInt O p
- pIntC :: Int -> PInt C p
- data family Vector a :: Type
- data family MVector s a :: Type
- data family LimitType i :: *
- newtype PointR t = PointR {
- fromPointR :: Int
- newtype PointL t = PointL {
- fromPointL :: Int
- pointLI :: Int -> PointL I
- pointLO :: Int -> PointL O
- pointLC :: Int -> PointL C
- data SP z = SP !z !Int#
- data family Vector a :: Type
- data family MVector s a :: Type
- data family LimitType i :: *
- newtype Subword t = Subword {
- fromSubword :: Int :. Int
- fromSubwordFst :: Subword t -> Int
- fromSubwordSnd :: Subword t -> Int
- subword :: Int -> Int -> Subword t
- subwordI :: Int -> Int -> Subword I
- subwordO :: Int -> Int -> Subword O
- subwordC :: Int -> Int -> Subword C
- module Data.PrimitiveArray.Index.Unit
Documentation
data family Vector a :: Type #
Instances
data family MVector s a :: Type #
Instances
data family LimitType i :: * Source #
Data structure encoding the upper limit for each array.
Instances
Newtype for a bitset.
Int
integrates better with the rest of the framework. But we should
consider moving to Word
-based indexing, if possible.
Instances
data family Vector a :: Type #
Instances
data family MVector s a :: Type #
Instances
data family LimitType i :: * Source #
Data structure encoding the upper limit for each array.
Instances
The bitset with one interface or boundary.
Instances
Vector Vector (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (BitSet1 i ioc) -> m (Vector (BitSet1 i ioc)) # basicUnsafeThaw :: PrimMonad m => Vector (BitSet1 i ioc) -> m (Mutable Vector (PrimState m) (BitSet1 i ioc)) # basicLength :: Vector (BitSet1 i ioc) -> Int # basicUnsafeSlice :: Int -> Int -> Vector (BitSet1 i ioc) -> Vector (BitSet1 i ioc) # basicUnsafeIndexM :: Monad m => Vector (BitSet1 i ioc) -> Int -> m (BitSet1 i ioc) # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (BitSet1 i ioc) -> Vector (BitSet1 i ioc) -> m () # elemseq :: Vector (BitSet1 i ioc) -> BitSet1 i ioc -> b -> b # | |
MVector MVector (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 basicLength :: MVector s (BitSet1 i ioc) -> Int # basicUnsafeSlice :: Int -> Int -> MVector s (BitSet1 i ioc) -> MVector s (BitSet1 i ioc) # basicOverlaps :: MVector s (BitSet1 i ioc) -> MVector s (BitSet1 i ioc) -> Bool # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (BitSet1 i ioc)) # basicInitialize :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> m () # basicUnsafeReplicate :: PrimMonad m => Int -> BitSet1 i ioc -> m (MVector (PrimState m) (BitSet1 i ioc)) # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> Int -> m (BitSet1 i ioc) # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> Int -> BitSet1 i ioc -> m () # basicClear :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> m () # basicSet :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> BitSet1 i ioc -> m () # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> MVector (PrimState m) (BitSet1 i ioc) -> m () # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> MVector (PrimState m) (BitSet1 i ioc) -> m () # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (BitSet1 i ioc) -> Int -> m (MVector (PrimState m) (BitSet1 i ioc)) # | |
Show (LimitType (BitSet1 bnd ioc)) Source # | |
IndexStream z => IndexStream (z :. BitSet1 i O) Source # | |
IndexStream z => IndexStream (z :. BitSet1 i I) Source # | |
Eq (BitSet1 i ioc) Source # | |
Ord (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 compare :: BitSet1 i ioc -> BitSet1 i ioc -> Ordering # (<) :: BitSet1 i ioc -> BitSet1 i ioc -> Bool # (<=) :: BitSet1 i ioc -> BitSet1 i ioc -> Bool # (>) :: BitSet1 i ioc -> BitSet1 i ioc -> Bool # (>=) :: BitSet1 i ioc -> BitSet1 i ioc -> Bool # | |
Show (BitSet1 i ioc) Source # | |
Generic (BitSet1 i ioc) Source # | |
Arbitrary (BitSet1 t ioc) Source # | |
Unbox (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 | |
IndexStream (Z :. BitSet1 i t) => IndexStream (BitSet1 i t) Source # | |
Index (BitSet1 bnd ioc) Source # | NOTE We linearize a bitset as follows: we need | TODO The size calculations are off by a factor of two, exactly. Each
bitset (say) |
Defined in Data.PrimitiveArray.Index.BitSet1 linearIndex :: LimitType (BitSet1 bnd ioc) -> BitSet1 bnd ioc -> Int Source # size :: LimitType (BitSet1 bnd ioc) -> Int Source # inBounds :: LimitType (BitSet1 bnd ioc) -> BitSet1 bnd ioc -> Bool Source # zeroBound :: BitSet1 bnd ioc Source # zeroBound' :: LimitType (BitSet1 bnd ioc) Source # totalSize :: LimitType (BitSet1 bnd ioc) -> [Integer] Source # | |
SetPredSucc (BitSet1 t ioc) Source # | |
data MVector s (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 | |
type Rep (BitSet1 i ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 type Rep (BitSet1 i ioc) = D1 (MetaData "BitSet1" "Data.PrimitiveArray.Index.BitSet1" "PrimitiveArray-0.9.0.0-7o4e78MXLzPCxIvR95QAvs" False) (C1 (MetaCons "BitSet1" PrefixI True) (S1 (MetaSel (Just "_bitset") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (BitSet ioc)) :*: S1 (MetaSel (Just "_boundary") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Boundary i ioc)))) | |
data Vector (BitSet1 i ioc) Source # | |
data LimitType (BitSet1 bnd ioc) Source # | |
Defined in Data.PrimitiveArray.Index.BitSet1 |
boundary :: forall i ioc i. Lens (BitSet1 i ioc) (BitSet1 i ioc) (Boundary i ioc) (Boundary i ioc) Source #
data family Vector a :: Type #
Instances
data family MVector s a :: Type #
Instances
data family LimitType i :: * Source #
Data structure encoding the upper limit for each array.
Instances
newtype PInt (ioc :: k) (p :: k) Source #
A PInt
behaves exactly like an Int
, but has an attached phantom
type p
. In particular, the Index
and IndexStream
instances are the
same as for raw Int
s.
Instances
data family Vector a :: Type #
Instances
data family MVector s a :: Type #
Instances
data family LimitType i :: * Source #
Data structure encoding the upper limit for each array.
Instances
A point in a right-linear grammars.
PointR | |
|
A point in a left-linear grammar. The syntactic symbol is in left-most position.
PointL | |
|
Instances
data family Vector a :: Type #
Instances
data family MVector s a :: Type #
Instances
data family LimitType i :: * Source #
Data structure encoding the upper limit for each array.
Instances
A subword wraps a pair of Int
indices i,j
with i<=j
.
Subwords always yield the upper-triangular part of a rect-angular array.
This gives the quite curious effect that (0,N)
points to the
`largest'
index, while (0,0) ... (1,1) ... (k,k) ... (N,N)
point to
the smallest. We do, however, use (0,0) as the smallest as (0,k) gives
successively smaller upper triangular parts.
Subword | |
|
Instances
fromSubwordFst :: Subword t -> Int Source #
fromSubwordSnd :: Subword t -> Int Source #