BiobaseTypes-0.1.1.0: Collection of types for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Biobase.Types.Index.Type

Synopsis

Documentation

newtype Index t Source

A linear Int-based index type.

Constructors

Index 

Fields

getIndex :: Int
 

Instances

Vector Vector (Index t) 
MVector MVector (Index t) 
Eq (Index t) 
KnownNat t => Num (Index t) 
Ord (Index t) 
Read (Index t) 
Show (Index t) 
Ix (Index t) 
Generic (Index t) 
KnownNat t => Index (Index t) 
IndexStream (Index t) 
Arbitrary (Index t) 
ToJSON (Index t) 
FromJSON (Index t) 
Binary (Index t) 
Serialize (Index t) 
NFData (Index t) 
Hashable (Index t) 
Unbox (Index t) 
IndexStream z => IndexStream ((:.) z (Index t)) 
data MVector s0 (Index t0) = MV_Index (MVector s Int) 
type Rep (Index t) 
data Vector (Index t0) = V_Index (Vector Int) 

index :: forall t. KnownNat t => Int -> Index t Source

Turn an Int into an Index safely.

maybeIndex :: forall t. KnownNat t => Int -> Maybe (Index t) Source

Produce Just and Index or Nothing.