Skip to content

Commit

Permalink
screened 2024-06-02 21:29:33+00:00
Browse files Browse the repository at this point in the history
  • Loading branch information
hsenag committed Jun 2, 2024
1 parent c333291 commit 2b1f724
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Darcs/UI/Commands/ShowAuthors.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
-- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-- Boston, MA 02110-1301, USA.

{-# OPTIONS_GHC -Wno-x-data-list-nonempty-unzip #-}

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-8.8.2

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-8.10.7

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-9.2.8

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-9.0.2

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-8.4.4

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-8.6.5

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-9.4.8

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / macos-13 / ghc-9.0.2

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 / ghc-9.6.4

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / macos-13 / ghc-8.4.4

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / macos-13 / ghc-8.6.5

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip

Check failure on line 18 in src/Darcs/UI/Commands/ShowAuthors.hs

View workflow job for this annotation

GitHub Actions / macos-13 / ghc-8.10.7

unrecognised warning flag: -Wno-x-data-list-nonempty-unzip
module Darcs.UI.Commands.ShowAuthors
( showAuthors, Spelling, compiledAuthorSpellings, canonizeAuthor, rankAuthors
) where

import Control.Arrow ( (&&&), (***) )
import Data.Char ( toLower, isSpace )
import Data.Function ( on )
import Data.Functor ( unzip )
import Data.List ( isInfixOf, sortBy, sort )
import Data.List.NonEmpty ( group, groupBy )
import qualified Data.List.NonEmpty as NE
Expand All @@ -32,7 +32,7 @@ import System.IO.Error ( catchIOError )
import Text.ParserCombinators.Parsec hiding ( lower, count, Line )
import Text.ParserCombinators.Parsec.Error

import Darcs.Prelude hiding ( unzip )
import Darcs.Prelude

import Darcs.UI.Flags ( DarcsFlag, useCache, verbose )
import Darcs.UI.Options ( oid, (?) )
Expand Down Expand Up @@ -135,7 +135,7 @@ rankAuthors spellings authors =
reverse $ sortBy (comparing fst) .
-- Combine duplicates from a list [(count, canonized name)]
-- with duplicates canonized names (see next comment).
map ((sum *** NE.head) . unzip) .
map ((sum *** NE.head) . NE.unzip) .
groupBy ((==) `on` snd) .
sortBy (comparing snd) .
-- Because it would take a long time to canonize "foo" into
Expand Down

0 comments on commit 2b1f724

Please sign in to comment.