-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Lists with statically known length based on non-empty package.
--
-- This packages defines a list data type with statically known length by
-- nesting the NonEmpty and Empty data structure from the non-empty
-- package. We provide a closed world class for this class of structures
-- http://www.haskell.org/haskellwiki/Closed_world_instances and a
-- wrapper that makes all these lists Traversable and
-- Applicative with ZipList semantics.
--
-- Similar packages:
--
--
-- - fixed-list: Defines an open world class.
--
@package fixed-length
@version 0.1.1
module Data.FixedLength
class (list ~ List (Position list)) => C list where type Position list :: * where {
type family Position list :: *;
}
switch :: C list => f T -> (forall list0. C list0 => f (T list0)) -> f list
switch :: C list => f T -> (forall list0. C list0 => f (T list0)) -> f list
newtype Wrap list a
Wrap :: list a -> Wrap list a
[unwrap] :: Wrap list a -> list a
newtype WrapPos list
WrapPos :: Position list -> WrapPos list
[unwrapPos] :: WrapPos list -> Position list
data Zero
data Succ pos
Stop :: Succ pos
Succ :: pos -> Succ pos
toList :: (C list) => list a -> [a]
equal :: (C list, Eq a) => list a -> list a -> Bool
showsPrec :: (C list, Show a) => Int -> list a -> ShowS
map :: C list => (a -> b) -> list a -> list b
zipWith :: C list => (a -> b -> c) -> list a -> list b -> list c
sequenceA :: (Applicative f, C list) => list (f a) -> f (list a)
repeat :: C list => a -> list a
index :: C list => WrapPos list -> list a -> a
update :: C list => (a -> a) -> WrapPos list -> list a -> list a
indices :: C list => list (WrapPos list)
indicesInt :: C list => list Int
numFromPos :: C list => WrapPos list -> Word
type N0 = T
type N1 = GE1 T
type N2 = GE2 T
type N3 = GE3 T
type N4 = GE4 T
type N5 = GE5 T
type N6 = GE6 T
type N7 = GE7 T
type N8 = GE8 T
type GE1 list = T list
type GE2 list = T (GE1 list)
type GE3 list = T (GE2 list)
type GE4 list = T (GE3 list)
type GE5 list = T (GE4 list)
type GE6 list = T (GE5 list)
type GE7 list = T (GE6 list)
type GE8 list = T (GE7 list)
i0 :: WrapPos (GE1 list)
i1 :: WrapPos (GE2 list)
i2 :: WrapPos (GE3 list)
i3 :: WrapPos (GE4 list)
i4 :: WrapPos (GE5 list)
i5 :: WrapPos (GE6 list)
i6 :: WrapPos (GE7 list)
i7 :: WrapPos (GE8 list)
(!:) :: a -> f a -> T f a
infixr 5 !:
end :: T a
instance GHC.Show.Show pos => GHC.Show.Show (Data.FixedLength.Succ pos)
instance GHC.Classes.Ord pos => GHC.Classes.Ord (Data.FixedLength.Succ pos)
instance GHC.Classes.Eq pos => GHC.Classes.Eq (Data.FixedLength.Succ pos)
instance Data.FixedLength.C Data.Empty.T
instance Data.FixedLength.C list => Data.FixedLength.C (Data.NonEmptyPrivate.T list)
instance Data.FixedLength.C list => GHC.Base.Functor (Data.FixedLength.Wrap list)
instance Data.FixedLength.C list => Data.Foldable.Foldable (Data.FixedLength.Wrap list)
instance Data.FixedLength.C list => Data.Traversable.Traversable (Data.FixedLength.Wrap list)
instance Data.FixedLength.C list => GHC.Base.Applicative (Data.FixedLength.Wrap list)
instance GHC.Classes.Eq Data.FixedLength.Zero
instance GHC.Classes.Ord Data.FixedLength.Zero
instance Data.FixedLength.C list => GHC.Classes.Eq (Data.FixedLength.WrapPos list)
instance Data.FixedLength.C list => GHC.Classes.Ord (Data.FixedLength.WrapPos list)