Agda-2.5.4.1: A dependently typed functional programming language and proof assistant

Safe HaskellSafe
LanguageHaskell2010

Agda.Utils.NonemptyList

Description

Nonempty lists.

Synopsis

Documentation

data NonemptyList a Source #

Constructors

(:!) infixr 5 

Fields

Instances
Monad NonemptyList Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Functor NonemptyList Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Methods

fmap :: (a -> b) -> NonemptyList a -> NonemptyList b #

(<$) :: a -> NonemptyList b -> NonemptyList a #

Applicative NonemptyList Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Foldable NonemptyList Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Methods

fold :: Monoid m => NonemptyList m -> m #

foldMap :: Monoid m => (a -> m) -> NonemptyList a -> m #

foldr :: (a -> b -> b) -> b -> NonemptyList a -> b #

foldr' :: (a -> b -> b) -> b -> NonemptyList a -> b #

foldl :: (b -> a -> b) -> b -> NonemptyList a -> b #

foldl' :: (b -> a -> b) -> b -> NonemptyList a -> b #

foldr1 :: (a -> a -> a) -> NonemptyList a -> a #

foldl1 :: (a -> a -> a) -> NonemptyList a -> a #

toList :: NonemptyList a -> [a] #

null :: NonemptyList a -> Bool #

length :: NonemptyList a -> Int #

elem :: Eq a => a -> NonemptyList a -> Bool #

maximum :: Ord a => NonemptyList a -> a #

minimum :: Ord a => NonemptyList a -> a #

sum :: Num a => NonemptyList a -> a #

product :: Num a => NonemptyList a -> a #

Traversable NonemptyList Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Methods

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

sequenceA :: Applicative f => NonemptyList (f a) -> f (NonemptyList a) #

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

sequence :: Monad m => NonemptyList (m a) -> m (NonemptyList a) #

Eq a => Eq (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Data a => Data (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Methods

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

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

toConstr :: NonemptyList a -> Constr #

dataTypeOf :: NonemptyList a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Show a => Show (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Semigroup (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.NonemptyList

Pretty a => Pretty (NonemptyList a) Source # 
Instance details

Defined in Agda.Utils.Pretty

KillRange a => KillRange (NonemptyList a) Source # 
Instance details

Defined in Agda.Syntax.Position

HasRange a => HasRange (NonemptyList a) Source #

Precondition: The ranges of the list elements must point to the same file (or be empty).

Instance details

Defined in Agda.Syntax.Position

EmbPrj a => EmbPrj (NonemptyList a) Source # 
Instance details

Defined in Agda.TypeChecking.Serialise.Instances.Common

NamesIn a => NamesIn (NonemptyList a) Source # 
Instance details

Defined in Agda.Syntax.Internal.Names

unionNe :: Eq a => NonemptyList a -> NonemptyList a -> NonemptyList a Source #

Returns the union of the argument lists seen as sets. The order of the elements in the result is not specified. Precondition: arguments contain no duplicates.

zipWithNe :: (a -> b -> c) -> NonemptyList a -> NonemptyList b -> NonemptyList c Source #

Zip two nonempty lists.

zipNe :: NonemptyList a -> NonemptyList b -> NonemptyList (a, b) Source #

Zip two nonempty lists.

caseListNe :: [a] -> b -> (NonemptyList a -> b) -> b Source #

Case on a list, getting a nonempty list in the cons case.

listCaseNe :: b -> (NonemptyList a -> b) -> [a] -> b Source #

Case on a list, with list last.

elemNe :: Eq a => a -> NonemptyList a -> Bool Source #

Check if an element is present in a list.

toList :: Foldable t => t a -> [a] #

List of elements of a structure, from left to right.