Hoogle Search

Within LTS Haskell 24.5 (ghc-9.10.2)

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

  1. sortMsgBag :: Maybe DiagOpts -> Bag (MsgEnvelope e) -> [MsgEnvelope e]

    ghc-lib-parser GHC.Utils.Error

    No documentation available.

  2. sortWith :: Ord b => (a -> b) -> [a] -> [a]

    ghc-lib-parser GHC.Utils.Misc

    The sortWith function sorts a list of elements using the user supplied function to project something out of each element In general if the user supplied function is expensive to compute then you should probably be using sortOn, as it only needs to compute it once for each element. sortWith, on the other hand must compute the mapping function for every comparison that it performs.

  3. sort' :: Expr -> Expr

    express Data.Express.Fixtures

    List sort lifted over the Expr type. Works for the element types Int, Char and Bool.

    > sort' $ unit one
    sort [1] :: Int
    
    > sort' $ unit bee
    sort "b" :: Int
    
    > sort' $ zero -:- unit two
    sort [0,2] :: Int
    
    > evl $ sort' $ two -:- unit one :: [Int]
    [1,2]
    

  4. sortBy :: Sequential c => (Element c -> Element c -> Ordering) -> c -> c

    foundation Foundation

    Sort an ordered collection using the specified order function

  5. sortBy :: Sequential c => (Element c -> Element c -> Ordering) -> c -> c

    foundation Foundation.Collection

    Sort an ordered collection using the specified order function

  6. sorts :: Ord a => Dims -> Array a -> Array a

    harpie Harpie.Array

    Sort an array along the supplied dimensions.

    >>> sorts [0] (array [2,2] [2,3,1,4])
    UnsafeArray [2,2] [1,4,2,3]
    
    >>> sorts [1] (array [2,2] [2,3,1,4])
    UnsafeArray [2,2] [2,3,1,4]
    
    >>> sorts [0,1] (array [2,2] [2,3,1,4])
    UnsafeArray [2,2] [1,2,3,4]
    

  7. sortsBy :: Ord b => Dims -> (Array a -> Array b) -> Array a -> Array a

    harpie Harpie.Array

    The indices into the array if it were sorted by a comparison function along the dimensions supplied.

    >>> import Data.Ord (Down (..))
    
    >>> sortsBy [0] (fmap Down) (array [2,2] [2,3,1,4])
    UnsafeArray [2,2] [2,3,1,4]
    

  8. sorts :: forall (ds :: [Nat]) (s :: [Nat]) a (si :: [Nat]) (so :: [Nat]) . (Ord a, KnownNats s, KnownNats si, KnownNats so, si ~ Eval (DeleteDims ds s), so ~ Eval (GetDims ds s), s ~ Eval (InsertDims ds so si)) => Dims ds -> Array s a -> Array s a

    harpie Harpie.Fixed

    Sort an array along the supplied dimensions.

    >>> pretty $ sorts (Dims @'[0]) (array @[2,2] [2,3,1,4])
    [[1,4],
    [2,3]]
    
    >>> pretty $ sorts (Dims @'[1]) (array @[2,2] [2,3,1,4])
    [[2,3],
    [1,4]]
    
    >>> pretty $ sorts (Dims @[0,1]) (array @[2,2] [2,3,1,4])
    [[1,2],
    [3,4]]
    

  9. sortsBy :: forall (ds :: [Nat]) (s :: [Nat]) a b (si :: [Nat]) (so :: [Nat]) . (Ord b, KnownNats s, KnownNats si, KnownNats so, si ~ Eval (DeleteDims ds s), so ~ Eval (GetDims ds s), s ~ Eval (InsertDims ds so si)) => Dims ds -> (Array si a -> Array si b) -> Array s a -> Array s a

    harpie Harpie.Fixed

    The indices into the array if it were sorted by a comparison function along the dimensions supplied.

    >>> import Data.Ord (Down (..))
    
    >>> toDynamic $ sortsBy (Dims @'[0]) (fmap Down) (array @[2,2] [2,3,1,4])
    UnsafeArray [2,2] [2,3,1,4]
    

  10. sortByV :: Ord b => (a -> b) -> Vector a -> Vector a

    harpie Harpie.Sort

    return the array sorted by the comparison function

    >>> sortByV Down (V.fromList [3,1,4,2,0,5::Int])
    [5,4,3,2,1,0]
    

Page 28 of many | Previous | Next