-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Description
The hint "Avoid NonEmpty.unzip" can and should be removed as there is now a custom warning x-data-list-nonempty-unzip
in base
for this function, see:
The hint malfunctions in my setting. In VSCode, with the HLS and GHC 9.12 (base 4.21), the hint shows up, even though I import unzip
from Data.Functor
rather than Data.List.NonEmpty
for this base version.
https://github.com/agda/agda/blob/670777792fb9ccdece123f782ef9ca5f0251f06b/src/full/Agda/Utils/List1.hs#L42-L46
-- Prevent warning -Wx-data-list-nonempty-unzip
#if MIN_VERSION_base(4,19,0)
import Data.Functor as Unzip (unzip)
#else
import Data.List.NonEmpty as Unzip (unzip)
#end
unzipWith :: (a -> (b, c)) -> List1 a -> (List1 b, List1 c)
unzipWith f = unzip . fmap f

Metadata
Metadata
Assignees
Labels
No labels