Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Bio.Base
- module BasePrelude
- module System.IO
- module System.Posix.Files
- module System.Posix.IO
- module System.Posix.Types
- type Bytes = ByteString
- type LazyBytes = ByteString
- data HashMap k v :: * -> * -> *
- data HashSet a :: * -> *
- data IntMap a :: * -> *
- data IntSet :: *
- data Text :: *
- type LazyText = Text
- data Pair a b = !a :!: !b
- type (:!:) = Pair
- decodeBytes :: Bytes -> Text
- encodeBytes :: Text -> Bytes
- class Hashable a where
- class Unpack s where
- fdPut :: Fd -> Bytes -> IO ()
- fdPutLazy :: Fd -> LazyBytes -> IO ()
- withFd :: FilePath -> OpenMode -> Maybe FileMode -> OpenFileFlags -> (Fd -> IO a) -> IO a
Documentation
module Bio.Base
module BasePrelude
module System.IO
module System.Posix.Files
module System.Posix.IO
module System.Posix.Types
type Bytes = ByteString Source #
type LazyBytes = ByteString Source #
data HashMap k v :: * -> * -> * #
A map from keys to values. A map cannot contain duplicate keys; each key can map to at most one value.
Functor (HashMap k) | |
Foldable (HashMap k) | |
Traversable (HashMap k) | |
ToJSONKey k => ToJSON1 (HashMap k) | |
(FromJSONKey k, Eq k, Hashable k) => FromJSON1 (HashMap k) | |
(Eq k, Hashable k) => IsList (HashMap k v) | |
(Eq k, Eq v) => Eq (HashMap k v) | |
(Data k, Data v, Eq k, Hashable k) => Data (HashMap k v) | |
(Eq k, Hashable k, Read k, Read e) => Read (HashMap k e) | |
(Show k, Show v) => Show (HashMap k v) | |
(Eq k, Hashable k) => Semigroup (HashMap k v) | |
(Eq k, Hashable k) => Monoid (HashMap k v) | |
(Hashable k, Hashable v) => Hashable (HashMap k v) | |
(ToJSON v, ToJSONKey k) => ToJSON (HashMap k v) | |
(FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON (HashMap k v) | |
(NFData k, NFData v) => NFData (HashMap k v) | |
type Item (HashMap k v) | |
A set of values. A set cannot contain duplicate values.
Foldable HashSet | |
ToJSON1 HashSet | |
(Eq a, Hashable a) => IsList (HashSet a) | |
(Hashable a, Eq a) => Eq (HashSet a) | |
(Data a, Eq a, Hashable a) => Data (HashSet a) | |
(Eq a, Hashable a, Read a) => Read (HashSet a) | |
Show a => Show (HashSet a) | |
(Hashable a, Eq a) => Semigroup (HashSet a) | |
(Hashable a, Eq a) => Monoid (HashSet a) | |
Hashable a => Hashable (HashSet a) | |
ToJSON a => ToJSON (HashSet a) | |
(Eq a, Hashable a, FromJSON a) => FromJSON (HashSet a) | |
NFData a => NFData (HashSet a) | |
type Item (HashSet a) | |
A map of integers to values a
.
Functor IntMap | |
Foldable IntMap | |
Traversable IntMap | |
ToJSON1 IntMap | |
FromJSON1 IntMap | |
IsList (IntMap a) | |
Eq a => Eq (IntMap a) | |
Data a => Data (IntMap a) | |
Ord a => Ord (IntMap a) | |
Read e => Read (IntMap e) | |
Show a => Show (IntMap a) | |
Semigroup (IntMap a) | |
Monoid (IntMap a) | |
ToJSON a => ToJSON (IntMap a) | |
FromJSON a => FromJSON (IntMap a) | |
Binary e => Binary (IntMap e) | |
NFData a => NFData (IntMap a) | |
type Item (IntMap a) | |
A set of integers.
A space efficient, packed, unboxed Unicode text type.
A strict pair.
!a :!: !b infixl 2 |
decodeBytes :: Bytes -> Text Source #
The class of types that can be converted to a hash value.
Minimal implementation: hashWithSalt
.
hashWithSalt :: Int -> a -> Int infixl 0 #
Return a hash value for the argument, using the given salt.
The general contract of hashWithSalt
is:
- If two values are equal according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce the same integer result if the same salt is used in each case. - It is not required that if two values are unequal
according to the
==
method, then applying thehashWithSalt
method on each of the two values must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal values may improve the performance of hashing-based data structures. - This method can be used to compute different hash values for
the same input by providing a different salt in each
application of the method. This implies that any instance
that defines
hashWithSalt
must make use of the salt in its implementation.
Like hashWithSalt
, but no salt is used. The default
implementation uses hashWithSalt
with some default salt.
Instances might want to implement this method to provide a more
efficient implementation than the default implementation.