Copyright | (c) Andrey Mulik 2019 |
---|---|
License | BSD-style |
Maintainer | work.a.mulik@gmail.com |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell2010 |
SortM
class SortM m s e | s -> m, s -> e where Source #
SortM
is class of sortable mutable structures.
sortedMBy :: (e -> e -> Bool) -> s -> m Bool Source #
Checks if structure is already sorted. Should always return True
for
structures with less than 2 elements.
sortMBy :: Compare e -> s -> m () Source #
sortMBy
is common sorting algorithm.
Instances
(MonadIO io, Unboxed e) => SortM io (MIOBytes# io e) e Source # | |
MonadIO io => SortM io (MIOArray# io e) e Source # | |
(BorderedM1 m rep Int e, SortM1 m rep e, SplitM1 m rep e, LinearM1 m rep e) => SortM m (AnyChunks rep e) e Source # | |
(Index i, SortM1 m rep e) => SortM m (AnyBorder rep i e) e Source # | |
Unboxed e => SortM (ST s) (STBytes# s e) e Source # | |
SortM (ST s) (STArray# s e) e Source # | |