Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

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

  1. sortFitsIn :: MonadConversion m => Sort -> Sort -> m ()

    Agda Agda.TypeChecking.Sort

    No documentation available.

  2. sortOf :: (PureTCM m, MonadBlock m, MonadConstraint m) => Term -> m Sort

    Agda Agda.TypeChecking.Sort

    Reconstruct the sort of a term. Precondition: given term is a well-sorted type.

  3. sortOfType :: (PureTCM m, MonadBlock m, MonadConstraint m) => Type -> m Sort

    Agda Agda.TypeChecking.Sort

    Reconstruct the minimal sort of a type (ignoring the sort annotation).

  4. sorted :: Ord a => [a] -> Bool

    Agda Agda.Utils.List

    Check whether a list is sorted. O(n). Assumes that the Ord instance implements a partial order.

  5. sortBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty a

    Agda Agda.Utils.List1

    sortBy for NonEmpty, behaves the same as sortBy

  6. sortOn :: Ord b => (a -> b) -> NonEmpty a -> NonEmpty a

    Agda Agda.Utils.List1

    Sort a NonEmpty on a user-supplied projection of its elements. See sortOn for more detailed information.

    Examples

    >>> sortOn fst $ (2, "world") :| [(4, "!"), (1, "Hello")]
    (1,"Hello") :| [(2,"world"),(4,"!")]
    
    >>> sortOn length $ "jim" :| ["creed", "pam", "michael", "dwight", "kevin"]
    "jim" :| ["pam","creed","kevin","dwight","michael"]
    

    Performance notes

    This function minimises the projections performed, by materialising the projections in an intermediate list. For trivial projections, you should prefer using sortBy with comparing, for example:
    >>> sortBy (comparing fst) $ (3, 1) :| [(2, 2), (1, 3)]
    (1,3) :| [(2,2),(3,1)]
    
    Or, for the exact same API as sortOn, you can use `sortBy . comparing`:
    >>> (sortBy . comparing) fst $ (3, 1) :| [(2, 2), (1, 3)]
    (1,3) :| [(2,2),(3,1)]
    
    sortWith is an alias for `sortBy . comparing`.

  7. sortWith :: Ord o => (a -> o) -> NonEmpty a -> NonEmpty a

    Agda Agda.Utils.List1

    sortWith for NonEmpty, behaves the same as:

    sortBy . comparing
    

  8. sortPair :: Ord a => (a, a) -> (a, a)

    Agda Agda.Utils.Tuple

    Order a pair.

  9. sortRulesByPrecedence :: [Rule] -> [(Integer, Rule)]

    BNFC BNFC.CF

    Sort rules by descending precedence.

  10. sort2B :: (IfB a, OrdB a) => (a, a) -> (a, a)

    Boolean Data.Boolean

    Variant of min and max using ifB and (<=*)

Page 38 of many | Previous | Next