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.
-
Agda Agda.Interaction.InteractionTop Sorts interaction points based on their ranges.
sortUniv :: Sort' t -> Maybe UnivAgda Agda.Syntax.Internal Get the flavor of the universe. Nothing could also mean "don't know".
sortKit :: (HasBuiltins m, MonadTCError m, HasOptions m) => m SortKitAgda Agda.TypeChecking.Monad.Builtin Compute a SortKit in an environment that supports failures. When optLoadPrimitives is set to False, sortKit is a fallible operation, so for the uses of sortKit in fallible contexts (e.g. TCM), we report a type error rather than exploding.
sortRulesOfSymbol :: QName -> TCM ()Agda Agda.TypeChecking.Rewriting.Confluence No documentation available.
sortFitsIn :: MonadConversion m => Sort -> Sort -> m ()Agda Agda.TypeChecking.Sort No documentation available.
sortOf :: (PureTCM m, MonadBlock m, MonadConstraint m) => Term -> m SortAgda Agda.TypeChecking.Sort Reconstruct the sort of a term. Precondition: given term is a well-sorted type.
sortOfType :: (PureTCM m, MonadBlock m, MonadConstraint m) => Type -> m SortAgda Agda.TypeChecking.Sort Reconstruct the minimal sort of a type (ignoring the sort annotation).
sorted :: Ord a => [a] -> BoolAgda Agda.Utils.List Check whether a list is sorted. O(n). Assumes that the Ord instance implements a partial order.
sortBy :: (a -> a -> Ordering) -> NonEmpty a -> NonEmpty aAgda Agda.Utils.List1 sortOn :: Ord b => (a -> b) -> NonEmpty a -> NonEmpty aAgda 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`.