Copyright | (c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 Kowainik |
---|---|
License | MIT |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Typeclass for creating structures from singleton element.
Documentation
Typeclass for data types that can be created from one element.
>>>
one True :: [Bool]
[True]>>>
one 'a' :: Text
"a">>>
one (3, "hello") :: HashMap Int String
fromList [(3,"hello")]
Instances
One ByteString Source # | |
Defined in Relude.Container.One type OneItem ByteString :: Type Source # one :: OneItem ByteString -> ByteString Source # | |
One ByteString Source # | |
Defined in Relude.Container.One type OneItem ByteString :: Type Source # one :: OneItem ByteString -> ByteString Source # | |
One IntSet Source # | |
One Text Source # | |
One Text Source # | |
One [a] Source # | |
One (NonEmpty a) Source # | |
One (IntMap v) Source # | |
One (Seq a) Source # | |
One (Set v) Source # | |
Hashable v => One (HashSet v) Source # | |
One (Map k v) Source # | |
Hashable k => One (HashMap k v) Source # | |