Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Data.Tuple.Solo
Description
Solo
fills the
tuple gap
with a singleton tuple.
Solo
does not support
the usual parenthesized tuple syntax.
- has the expected laziness properties
- can be pattern-matched
- ships with instances for several standard type classes, including all those supported by H98-standard tuples
- requires no language extensions, except for hierarchical modules
Note: on GHC-9.0
getSolo
is not a record selector.
Documentation
Solo is the singleton tuple data type.
Constructors
Solo a |
Instances
Monad Solo Source # | |
Functor Solo Source # | |
MonadFix Solo Source # | |
Applicative Solo Source # | |
Foldable Solo Source # | |
Defined in Data.Tuple.Solo Methods fold :: Monoid m => Solo m -> m Source # foldMap :: Monoid m => (a -> m) -> Solo a -> m Source # foldMap' :: Monoid m => (a -> m) -> Solo a -> m Source # foldr :: (a -> b -> b) -> b -> Solo a -> b Source # foldr' :: (a -> b -> b) -> b -> Solo a -> b Source # foldl :: (b -> a -> b) -> b -> Solo a -> b Source # foldl' :: (b -> a -> b) -> b -> Solo a -> b Source # foldr1 :: (a -> a -> a) -> Solo a -> a Source # foldl1 :: (a -> a -> a) -> Solo a -> a Source # toList :: Solo a -> [a] Source # null :: Solo a -> Bool Source # length :: Solo a -> Int Source # elem :: Eq a => a -> Solo a -> Bool Source # maximum :: Ord a => Solo a -> a Source # minimum :: Ord a => Solo a -> a Source # |
|
Traversable Solo Source # | |
Eq1 Solo Source # | |
Ord1 Solo Source # | |
Defined in Data.Tuple.Solo |
|
Read1 Solo Source # | |
Defined in Data.Tuple.Solo Methods liftReadsPrec :: ( Int -> ReadS a) -> ReadS [a] -> Int -> ReadS ( Solo a) Source # liftReadList :: ( Int -> ReadS a) -> ReadS [a] -> ReadS [ Solo a] Source # liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec ( Solo a) Source # liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [ Solo a] Source # |
|
Show1 Solo Source # | |
MonadZip Solo Source # | |
Hashable1 Solo Source # |
Since: 0.3.1 |
Defined in Data.Tuple.Solo |
|
Bounded a => Bounded ( Solo a) Source # | |
Enum a => Enum ( Solo a) Source # | |
Defined in Data.Tuple.Solo Methods succ :: Solo a -> Solo a Source # pred :: Solo a -> Solo a Source # toEnum :: Int -> Solo a Source # fromEnum :: Solo a -> Int Source # enumFrom :: Solo a -> [ Solo a] Source # enumFromThen :: Solo a -> Solo a -> [ Solo a] Source # enumFromTo :: Solo a -> Solo a -> [ Solo a] Source # enumFromThenTo :: Solo a -> Solo a -> Solo a -> [ Solo a] Source # |
|
Eq a => Eq ( Solo a) Source # | |
Data a => Data ( Solo a) Source # | |
Defined in Data.Tuple.Solo Methods gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> Solo a -> c ( Solo a) Source # gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c ( Solo a) Source # toConstr :: Solo a -> Constr Source # dataTypeOf :: Solo a -> DataType Source # dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c ( Solo a)) Source # dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c ( Solo a)) Source # gmapT :: ( forall b. Data b => b -> b) -> Solo a -> Solo a Source # gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> Solo a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> Solo a -> r Source # gmapQ :: ( forall d. Data d => d -> u) -> Solo a -> [u] Source # gmapQi :: Int -> ( forall d. Data d => d -> u) -> Solo a -> u Source # gmapM :: Monad m => ( forall d. Data d => d -> m d) -> Solo a -> m ( Solo a) Source # gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> Solo a -> m ( Solo a) Source # gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> Solo a -> m ( Solo a) Source # |
|
Ord a => Ord ( Solo a) Source # | |
Read a => Read ( Solo a) Source # | |
Show a => Show ( Solo a) Source # | |
Ix a => Ix ( Solo a) Source # | |
Generic ( Solo a) Source # | |
Semigroup a => Semigroup ( Solo a) Source # | |
Monoid a => Monoid ( Solo a) Source # | |
Hashable a => Hashable ( Solo a) Source # |
Since: 0.3.1 |
Generic1 Solo Source # | |
type Rep ( Solo a) Source # | |
Defined in Data.Tuple.Solo |
|
type Rep1 Solo Source # | |
Defined in Data.Tuple.Solo |