camfort-1.0.1: CamFort - Cambridge Fortran infrastructure
Safe HaskellNone
LanguageHaskell2010

Camfort.Helpers.Vec

Synopsis

Datatypes

data EqT a b where Source #

Constructors

ReflEq :: EqT a a 

data ExistsEqT t n where Source #

Constructors

ExistsEqT :: EqT (t m) n -> ExistsEqT t n 

data Nat Source #

Constructors

Z 
S Nat 

data Natural (n :: Nat) where Source #

Constructors

Zero :: Natural 'Z 
Succ :: Natural n -> Natural ('S n) 

Instances

Instances details
Show (Natural n) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

showsPrec :: Int -> Natural n -> ShowS #

show :: Natural n -> String #

showList :: [Natural n] -> ShowS #

data Vec (n :: Nat) a where Source #

Constructors

Nil :: Vec 'Z a 
Cons :: a -> Vec n a -> Vec ('S n) a 

Instances

Instances details
Functor (Vec n) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

fmap :: (a -> b) -> Vec n a -> Vec n b #

(<$) :: a -> Vec n b -> Vec n a #

Foldable (Vec n) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

fold :: Monoid m => Vec n m -> m #

foldMap :: Monoid m => (a -> m) -> Vec n a -> m #

foldMap' :: Monoid m => (a -> m) -> Vec n a -> m #

foldr :: (a -> b -> b) -> b -> Vec n a -> b #

foldr' :: (a -> b -> b) -> b -> Vec n a -> b #

foldl :: (b -> a -> b) -> b -> Vec n a -> b #

foldl' :: (b -> a -> b) -> b -> Vec n a -> b #

foldr1 :: (a -> a -> a) -> Vec n a -> a #

foldl1 :: (a -> a -> a) -> Vec n a -> a #

toList :: Vec n a -> [a] #

null :: Vec n a -> Bool #

length :: Vec n a -> Int #

elem :: Eq a => a -> Vec n a -> Bool #

maximum :: Ord a => Vec n a -> a #

minimum :: Ord a => Vec n a -> a #

sum :: Num a => Vec n a -> a #

product :: Num a => Vec n a -> a #

Eq a => Eq (Vec n a) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

(==) :: Vec n a -> Vec n a -> Bool #

(/=) :: Vec n a -> Vec n a -> Bool #

Ord a => Ord (Vec n a) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

compare :: Vec n a -> Vec n a -> Ordering #

(<) :: Vec n a -> Vec n a -> Bool #

(<=) :: Vec n a -> Vec n a -> Bool #

(>) :: Vec n a -> Vec n a -> Bool #

(>=) :: Vec n a -> Vec n a -> Bool #

max :: Vec n a -> Vec n a -> Vec n a #

min :: Vec n a -> Vec n a -> Vec n a #

Show a => Show (Vec n a) Source # 
Instance details

Defined in Camfort.Helpers.Vec

Methods

showsPrec :: Int -> Vec n a -> ShowS #

show :: Vec n a -> String #

showList :: [Vec n a] -> ShowS #

PartialOrd a => PartialOrd (Vec n a) Source # 
Instance details

Defined in Camfort.Specification.Stencils.Model

Methods

(<=) :: Vec n a -> Vec n a -> Bool Source #

(>=) :: Vec n a -> Vec n a -> Bool Source #

(==) :: Vec n a -> Vec n a -> Bool Source #

(/=) :: Vec n a -> Vec n a -> Bool Source #

(<) :: Vec n a -> Vec n a -> Bool Source #

(>) :: Vec n a -> Vec n a -> Bool Source #

compare :: Vec n a -> Vec n a -> Maybe Ordering Source #

BoundedMeetSemiLattice a => Lattice (UnionNF n a) 
Instance details

Defined in Camfort.Specification.Stencils.Model

Methods

(\/) :: UnionNF n a -> UnionNF n a -> UnionNF n a

(/\) :: UnionNF n a -> UnionNF n a -> UnionNF n a

data VecBox a where Source #

Constructors

VecBox :: Vec n a -> VecBox a 

data VecList a where Source #

Constructors

VL :: [Vec n a] -> VecList a 

Vector Operations

(!!) :: Vec n a -> Int -> a Source #

findIndex :: (a -> Bool) -> Vec n a -> Maybe Int Source #

fromList :: [a] -> VecBox a Source #

fromLists :: forall a. [[a]] -> VecList a Source #

length :: Vec n a -> Int Source #

lengthN :: Vec n a -> Natural n Source #

proveEqSize :: Vec n a -> Vec m b -> Maybe (EqT m n) Source #

replace :: Int -> a -> Vec n a -> Vec n a Source #

toList :: Vec n a -> [a] Source #

zip :: Vec n a -> Vec n b -> Vec n (a, b) Source #

zipWith :: (a -> b -> c) -> Vec n a -> Vec n b -> Vec n c Source #