mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-10 11:15:08 +03:00
automatically run ormolu
This commit is contained in:
parent
672d85205d
commit
629b27f80f
@ -18,10 +18,10 @@ import Data.Text (Text)
|
|||||||
class (Eq n) => Alphabetical n where
|
class (Eq n) => Alphabetical n where
|
||||||
compareAlphabetical :: n -> n -> Ordering
|
compareAlphabetical :: n -> n -> Ordering
|
||||||
|
|
||||||
sortAlphabetically :: Alphabetical a => [a] -> [a]
|
sortAlphabetically :: Alphabetical a => [a] -> [a]
|
||||||
sortAlphabetically as = (\(OrderAlphabetically a) -> a) <$> List.sort (map OrderAlphabetically as)
|
sortAlphabetically as = (\(OrderAlphabetically a) -> a) <$> List.sort (map OrderAlphabetically as)
|
||||||
|
|
||||||
sortAlphabeticallyOn :: Alphabetical a => (b -> a) -> [b] -> [b]
|
sortAlphabeticallyOn :: Alphabetical a => (b -> a) -> [b] -> [b]
|
||||||
sortAlphabeticallyOn f = List.sortOn (OrderAlphabetically . f)
|
sortAlphabeticallyOn f = List.sortOn (OrderAlphabetically . f)
|
||||||
|
|
||||||
instance Alphabetical Text where
|
instance Alphabetical Text where
|
||||||
|
Loading…
Reference in New Issue
Block a user