flp-0.1.0.0: A layout spec language for memory managers implemented in Rust.

Copyright(c) Alec Theriault 2017-2018
LicenseBSD-style
Maintaineralec.theriault@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Language.Rust.Parser.NonEmpty

Description

Datatype wrapping non-empty lists.

Documentation

newtype NonEmpty a Source #

Constructors

NonEmpty (NonEmpty a) 
Instances
Functor NonEmpty Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Methods

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

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

Foldable NonEmpty Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Methods

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

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

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

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

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

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

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

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

toList :: NonEmpty a -> [a] #

null :: NonEmpty a -> Bool #

length :: NonEmpty a -> Int #

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

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

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

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

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

Traversable NonEmpty Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Methods

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

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

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

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

IsList (NonEmpty a) Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Associated Types

type Item (NonEmpty a) :: Type #

Methods

fromList :: [Item (NonEmpty a)] -> NonEmpty a #

fromListN :: Int -> [Item (NonEmpty a)] -> NonEmpty a #

toList :: NonEmpty a -> [Item (NonEmpty a)] #

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

Defined in Language.Rust.Parser.NonEmpty

Methods

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

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

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

Defined in Language.Rust.Parser.NonEmpty

Methods

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

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

toConstr :: NonEmpty a -> Constr #

dataTypeOf :: NonEmpty a -> DataType #

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

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

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

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

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

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

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

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

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

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

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

Defined in Language.Rust.Parser.NonEmpty

Methods

compare :: NonEmpty a -> NonEmpty a -> Ordering #

(<) :: NonEmpty a -> NonEmpty a -> Bool #

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

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

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

max :: NonEmpty a -> NonEmpty a -> NonEmpty a #

min :: NonEmpty a -> NonEmpty a -> NonEmpty a #

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

Defined in Language.Rust.Parser.NonEmpty

Methods

showsPrec :: Int -> NonEmpty a -> ShowS #

show :: NonEmpty a -> String #

showList :: [NonEmpty a] -> ShowS #

Foldable (Reversed NonEmpty) Source # 
Instance details

Defined in Language.Rust.Parser.Reversed

Methods

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

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

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

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

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

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

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

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

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

null :: Reversed NonEmpty a -> Bool #

length :: Reversed NonEmpty a -> Int #

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

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

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

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

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

Semigroup (NonEmpty a) Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Methods

(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #

sconcat :: NonEmpty0 (NonEmpty a) -> NonEmpty a #

stimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

NFData a => NFData (NonEmpty a) Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

Methods

rnf :: NonEmpty a -> () #

Located a => Located (NonEmpty a) Source #

O(n) time complexity

Instance details

Defined in Language.Rust.Data.Position

Methods

spanOf :: NonEmpty a -> Span Source #

type Item (NonEmpty a) Source # 
Instance details

Defined in Language.Rust.Parser.NonEmpty

type Item (NonEmpty a) = a

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

head :: NonEmpty a -> a Source #

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

last :: NonEmpty a -> a Source #

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

(<|) :: a -> NonEmpty a -> NonEmpty a Source #

(|:) :: [a] -> a -> NonEmpty a Source #

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