Copyright | (c) 2011 National Institute of Aerospace / Galois Inc. |
---|---|
Safe Haskell | Safe |
Language | Haskell2010 |
Implementation of an array that uses type literals to store length. No explicit indexing is used for the input data. Supports arbitrary nesting of arrays.
Documentation
data Array (n :: Nat) t Source #
Implementation of an array that uses type literals to store length.
Instances
Foldable (Array n) Source # | This instance is deprecated in Copilot 3.11. |
Defined in Copilot.Core.Type.Array fold :: Monoid m => Array n m -> m # foldMap :: Monoid m => (a -> m) -> Array n a -> m # foldMap' :: Monoid m => (a -> m) -> Array n a -> m # foldr :: (a -> b -> b) -> b -> Array n a -> b # foldr' :: (a -> b -> b) -> b -> Array n a -> b # foldl :: (b -> a -> b) -> b -> Array n a -> b # foldl' :: (b -> a -> b) -> b -> Array n a -> b # foldr1 :: (a -> a -> a) -> Array n a -> a # foldl1 :: (a -> a -> a) -> Array n a -> a # elem :: Eq a => a -> Array n a -> Bool # maximum :: Ord a => Array n a -> a # minimum :: Ord a => Array n a -> a # | |
Show t => Show (Array n t) Source # | |
(Typeable t, Typed t, KnownNat n) => Typed (Array n t) Source # | |
Defined in Copilot.Core.Type | |
Flatten a b => Flatten (Array n a) b Source # | Flattening of nested arrays. |
array :: forall n t. KnownNat n => [t] -> Array n t Source #
Smart array constructor that only type checks if the length of the given list matches the length of the array at type level.
flatten :: Flatten a b => Array n a -> [b] Source #
Deprecated: This function is deprecated in Copilot 3.11.
Flatten an array to a list.
size :: forall a n b. (Flatten a b, b ~ InnerType a) => Array n a -> Int Source #
Deprecated: This function is deprecated in Copilot 3.11.
Total number of elements in a possibly nested array.
Deprecated: This class is deprecated in Copilot 3.11.
Flattening or conversion of arrays to lists.
type family InnerType x where ... Source #
Deprecated: This type family is deprecated in Copilot 3.11.
Association between an array and the type of the elements it contains.
arrayelems :: Array n a -> [a] Source #
Return the elemts of an array.