| License | BSD-style |
|---|---|
| Maintainer | Vincent Hanquez <vincent@snarc.org> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Foundation.List.ListN
Description
A Nat-sized list abstraction
Using this module is limited to GHC 7.10 and above.
Documentation
take :: forall a (m :: Nat) (n :: Nat). (KnownNat m, NatWithinBound Int m, m <= n) => ListN n a -> ListN m a #
drop :: forall a (d :: Nat) (m :: Nat) (n :: Nat). (KnownNat d, NatWithinBound Int d, (n - m) ~ d, m <= n) => ListN n a -> ListN m a #
splitAt :: forall a (d :: Nat) (m :: Nat) (n :: Nat). (KnownNat d, NatWithinBound Int d, (n - m) ~ d, m <= n) => ListN n a -> (ListN m a, ListN (n - m) a) #
zipWith3 :: forall a b c x (n :: Nat). (a -> b -> c -> x) -> ListN n a -> ListN n b -> ListN n c -> ListN n x #
zip4 :: forall (n :: Nat) a b c d. ListN n a -> ListN n b -> ListN n c -> ListN n d -> ListN n (a, b, c, d) #
zip5 :: forall (n :: Nat) a b c d e. ListN n a -> ListN n b -> ListN n c -> ListN n d -> ListN n e -> ListN n (a, b, c, d, e) #
zipWith4 :: forall a b c d x (n :: Nat). (a -> b -> c -> d -> x) -> ListN n a -> ListN n b -> ListN n c -> ListN n d -> ListN n x #
zipWith5 :: forall a b c d e x (n :: Nat). (a -> b -> c -> d -> e -> x) -> ListN n a -> ListN n b -> ListN n c -> ListN n d -> ListN n e -> ListN n x #
replicateM :: forall (n :: Nat) m a. (NatWithinBound Int n, Monad m, KnownNat n) => m a -> m (ListN n a) #
Instances
| NormalForm a => NormalForm (ListN n a) | |||||
Defined in Basement.Sized.List Methods toNormalForm :: ListN n a -> () # | |||||
| (Arbitrary a, KnownNat n, NatWithinBound Int n) => Arbitrary (ListN n a) Source # | |||||
| Copy (ListN n ty) Source # | |||||
| 1 <= n => Fold1able (ListN n a) Source # | |||||
Defined in Foundation.Collection.Foldable | |||||
| Foldable (ListN n a) Source # | |||||
| (NatWithinBound Int n, KnownNat n) => IndexedCollection (ListN n a) Source # | |||||
| Generic (ListN n a) | |||||
Defined in Basement.Sized.List Associated Types
| |||||
| Show a => Show (ListN n a) | |||||
| Eq a => Eq (ListN n a) | |||||
| Ord a => Ord (ListN n a) | |||||
Defined in Basement.Sized.List | |||||
| type Element (ListN n a) Source # | |||||
Defined in Foundation.Collection.Element | |||||
| type Rep (ListN n a) | |||||
Defined in Basement.Sized.List | |||||
toListN_ :: forall (n :: Nat) a. (HasCallStack, NatWithinBound Int n, KnownNat n) => [a] -> ListN n a #
createFrom :: forall a (n :: Nat) (start :: Nat). (KnownNat n, KnownNat start) => Proxy start -> (Natural -> a) -> ListN n a #