Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. sortByFL :: (a -> a -> Ordering) -> FocusList a -> FocusList a

    focuslist Data.FocusList

    Sort a FocusList. The Focus will stay with the element that has the Focus.

    >>> let Just fl = fromListFL (Focus 2) ["b", "c", "a"]
    
    >>> sortByFL compare fl
    FocusList (Focus 0) ["a","b","c"]
    
    Nothing will happen if you try to sort an empty FocusList, or a FocusList with only one element.
    emptyFL == sortByFL compare emptyFL
    
    singletonFL a == sortByFL compare (singletonFL a)
    
    The element with the Focus should be the same before and after sorting.
    getFocusItemFL (fl :: FocusList Int) == getFocusItemFL (sortByFL compare fl)
    
    Sorting a FocusList and getting the underlying Seq should be the same as getting the underlying Seq and then sorting it.
    toSeqFL (sortByFL compare (fl :: FocusList Int)) == sortBy compare (toSeqFL fl)
    
    WARNING: The computational complexity for this is very bad. It should be able to be done in O(n * log n), but the current implementation is O(n^2) (or worse), where n is the length of the FocusList. This function could be implemented the same way Data.Sequence.sortBy is implemented. However, a small change needs to be added to that function to keep track of the Focus in the FocusList and make sure it gets updated properly. If you're interested in fixing this, please send a PR.

  2. sortCardsBy :: OrderedCard c o => o -> [c] -> [c]

    general-games Game.Implement.Card

    No documentation available.

  3. sortListModelGetIncremental :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> m Bool

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Returns whether incremental sorting is enabled. See sortListModelSetIncremental.

  4. sortListModelGetModel :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> m (Maybe ListModel)

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Gets the model currently sorted or Nothing if none.

  5. sortListModelGetPending :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> m Word32

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Estimates progress of an ongoing sorting operation. The estimate is the number of items that would still need to be sorted to finish the sorting operation if this was a linear algorithm. So this number is not related to how many items are already correctly sorted. If you want to estimate the progress, you can use code like this:

    c code

    pending = gtk_sort_list_model_get_pending (self);
    model = gtk_sort_list_model_get_model (self);
    progress = 1.0 - pending / (double) MAX (1, g_list_model_get_n_items (model));
    
    If no sort operation is ongoing - in particular when SortListModel:incremental is False - this function returns 0.

  6. sortListModelGetSectionSorter :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> m (Maybe Sorter)

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Gets the section sorter that is used to sort items of self into sections. Since: 4.12

  7. sortListModelGetSorter :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> m (Maybe Sorter)

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Gets the sorter that is used to sort self.

  8. sortListModelNew :: (HasCallStack, MonadIO m, IsListModel a, IsSorter b) => Maybe a -> Maybe b -> m SortListModel

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Creates a new sort list model that uses the sorter to sort model.

  9. sortListModelSetIncremental :: (HasCallStack, MonadIO m, IsSortListModel a) => a -> Bool -> m ()

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Sets the sort model to do an incremental sort. When incremental sorting is enabled, the GtkSortListModel will not do a complete sort immediately, but will instead queue an idle handler that incrementally sorts the items towards their correct position. This of course means that items do not instantly appear in the right place. It also means that the total sorting time is a lot slower. When your filter blocks the UI while sorting, you might consider turning this on. Depending on your model and sorters, this may become interesting around 10,000 to 100,000 items. By default, incremental sorting is disabled. See sortListModelGetPending for progress information about an ongoing incremental sorting operation.

  10. sortListModelSetModel :: (HasCallStack, MonadIO m, IsSortListModel a, IsListModel b) => a -> Maybe b -> m ()

    gi-gtk4 GI.Gtk.Objects.SortListModel

    Sets the model to be sorted. The model's item type must conform to the item type of self.

Page 41 of many | Previous | Next