Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lists of length at least 2.
Import as:
import Agda.Utils.List2 (List2(List2))
import qualified Agda.Utils.List2 as List2
Synopsis
- data List2 a = List2 a a [a]
- head :: List2 a -> a
- tail :: List2 a -> List1 a
- init :: List2 a -> List1 a
- fromListMaybe :: [a] -> Maybe (List2 a)
- fromList1Maybe :: List1 a -> Maybe (List2 a)
- toList1 :: List2 a -> List1 a
- fromList1 :: List1 a -> List2 a
- break :: (a -> Bool) -> List2 a -> ([a], [a])
- toList :: IsList l => l -> [Item l]
Documentation
Lists of length ≥2.
List2 a a [a] |
Instances
Functor List2 Source # | |
Foldable List2 Source # | |
Defined in Agda.Utils.List2 fold :: Monoid m => List2 m -> m # foldMap :: Monoid m => (a -> m) -> List2 a -> m # foldMap' :: Monoid m => (a -> m) -> List2 a -> m # foldr :: (a -> b -> b) -> b -> List2 a -> b # foldr' :: (a -> b -> b) -> b -> List2 a -> b # foldl :: (b -> a -> b) -> b -> List2 a -> b # foldl' :: (b -> a -> b) -> b -> List2 a -> b # foldr1 :: (a -> a -> a) -> List2 a -> a # foldl1 :: (a -> a -> a) -> List2 a -> a # elem :: Eq a => a -> List2 a -> Bool # maximum :: Ord a => List2 a -> a # minimum :: Ord a => List2 a -> a # | |
Traversable List2 Source # | |
IsList (List2 a) Source # | |
Eq a => Eq (List2 a) Source # | |
Data a => Data (List2 a) Source # | |
Defined in Agda.Utils.List2 gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> List2 a -> c (List2 a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (List2 a) # toConstr :: List2 a -> Constr # dataTypeOf :: List2 a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (List2 a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (List2 a)) # gmapT :: (forall b. Data b => b -> b) -> List2 a -> List2 a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List2 a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List2 a -> r # gmapQ :: (forall d. Data d => d -> u) -> List2 a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> List2 a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> List2 a -> m (List2 a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> List2 a -> m (List2 a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> List2 a -> m (List2 a) # | |
Ord a => Ord (List2 a) Source # | |
Show a => Show (List2 a) Source # | |
NFData a => NFData (List2 a) Source # | |
Defined in Agda.Utils.List2 | |
KillRange a => KillRange (List2 a) Source # | |
Defined in Agda.Syntax.Position killRange :: KillRangeT (List2 a) Source # | |
HasRange a => HasRange (List2 a) Source # | |
CPatternLike p => CPatternLike (List2 p) Source # | |
Defined in Agda.Syntax.Concrete.Pattern foldrCPattern :: Monoid m => (Pattern -> m -> m) -> List2 p -> m Source # traverseCPatternA :: (Applicative m, Functor m) => (Pattern -> m Pattern -> m Pattern) -> List2 p -> m (List2 p) Source # traverseCPatternM :: Monad m => (Pattern -> m Pattern) -> (Pattern -> m Pattern) -> List2 p -> m (List2 p) Source # | |
ExprLike a => ExprLike (List2 a) Source # | |
EmbPrj a => EmbPrj (List2 a) Source # | |
type Item (List2 a) Source # | |
Defined in Agda.Utils.List2 |
fromListMaybe :: [a] -> Maybe (List2 a) Source #
Safe. O(1).