automatically run ormolu

This commit is contained in:
pchiusano 2023-07-11 18:35:05 +00:00 committed by github-actions[bot]
parent 672d85205d
commit 629b27f80f

View File

@ -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