ghc-internal-9.1300.0: Basic libraries
Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Internal.Data.List.NonEmpty

Synopsis

Documentation

data NonEmpty a Source #

Non-empty (and non-strict) list type.

Since: base-4.9.0.0

Constructors

a :| [a] infixr 5 

Instances

Instances details
Applicative NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

pure :: a -> NonEmpty a Source #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source #

Functor NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b Source #

(<$) :: a -> NonEmpty b -> NonEmpty a Source #

Monad NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b Source #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #

return :: a -> NonEmpty a Source #

MonadFix NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Control.Monad.Fix

Methods

mfix :: (a -> NonEmpty a) -> NonEmpty a Source #

MonadZip NonEmpty Source #

Since: ghc-internal-4.9.0.0

Instance details

Defined in GHC.Internal.Control.Monad.Zip

Methods

mzip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) Source #

mzipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

munzip :: NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Source #

Foldable NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Foldable

Methods

fold :: Monoid m => NonEmpty m -> m Source #

foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m Source #

foldr :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b Source #

foldl :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b Source #

foldr1 :: (a -> a -> a) -> NonEmpty a -> a Source #

foldl1 :: (a -> a -> a) -> NonEmpty a -> a Source #

toList :: NonEmpty a -> [a] Source #

null :: NonEmpty a -> Bool Source #

length :: NonEmpty a -> Int Source #

elem :: Eq a => a -> NonEmpty a -> Bool Source #

maximum :: Ord a => NonEmpty a -> a Source #

minimum :: Ord a => NonEmpty a -> a Source #

sum :: Num a => NonEmpty a -> a Source #

product :: Num a => NonEmpty a -> a Source #

Traversable NonEmpty Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> NonEmpty a -> f (NonEmpty b) Source #

sequenceA :: Applicative f => NonEmpty (f a) -> f (NonEmpty a) Source #

mapM :: Monad m => (a -> m b) -> NonEmpty a -> m (NonEmpty b) Source #

sequence :: Monad m => NonEmpty (m a) -> m (NonEmpty a) Source #

Generic1 NonEmpty Source # 
Instance details

Defined in GHC.Internal.Generics

Associated Types

type Rep1 NonEmpty

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Generics

Lift a => Lift (NonEmpty a :: Type) Source #

Since: template-haskell-2.15.0.0

Instance details

Defined in GHC.Internal.TH.Lift

Methods

lift :: Quote m => NonEmpty a -> m Exp Source #

liftTyped :: forall (m :: Type -> Type). Quote m => NonEmpty a -> Code m (NonEmpty a) Source #

Semigroup (NonEmpty a) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Data a => Data (NonEmpty a) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NonEmpty a -> c (NonEmpty a) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NonEmpty a) Source #

toConstr :: NonEmpty a -> Constr Source #

dataTypeOf :: NonEmpty a -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NonEmpty a)) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NonEmpty a)) Source #

gmapT :: (forall b. Data b => b -> b) -> NonEmpty a -> NonEmpty a Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NonEmpty a -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NonEmpty a -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NonEmpty a -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NonEmpty a -> m (NonEmpty a) Source #

Generic (NonEmpty a) Source # 
Instance details

Defined in GHC.Internal.Generics

Associated Types

type Rep (NonEmpty a)

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Generics

Methods

from :: NonEmpty a -> Rep (NonEmpty a) x Source #

to :: Rep (NonEmpty a) x -> NonEmpty a Source #

IsList (NonEmpty a) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.IsList

Associated Types

type Item (NonEmpty a) 
Instance details

Defined in GHC.Internal.IsList

type Item (NonEmpty a) = a
Read a => Read (NonEmpty a) Source #

Since: base-4.11.0.0

Instance details

Defined in GHC.Internal.Read

Show a => Show (NonEmpty a) Source #

Since: base-4.11.0.0

Instance details

Defined in GHC.Internal.Show

Eq a => Eq (NonEmpty a) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

Methods

(==) :: NonEmpty a -> NonEmpty a -> Bool Source #

(/=) :: NonEmpty a -> NonEmpty a -> Bool Source #

Ord a => Ord (NonEmpty a) Source #

Since: base-4.9.0.0

Instance details

Defined in GHC.Internal.Base

type Rep1 NonEmpty Source #

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Generics

type Rep (NonEmpty a) Source #

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Generics

type Item (NonEmpty a) Source # 
Instance details

Defined in GHC.Internal.IsList

type Item (NonEmpty a) = a

zip :: NonEmpty a -> NonEmpty b -> NonEmpty (a, b) Source #

The zip function takes two streams and returns a stream of corresponding pairs.

zipWith :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #

The zipWith function generalizes zip. Rather than tupling the elements, the elements are combined using the function passed as the first argument.