kazu-yamamoto / dnsext

Extensible DNS libraries written purely in Haskell
59 stars 3 forks source link

Hide unzip import/export from Data.Functor #167

Closed matteopt closed 5 months ago

matteopt commented 6 months ago

The unzip function was added to Data.Functor "Since: base-4.19.0.0".
https://hackage.haskell.org/package/base-4.19.1.0/docs/Data-Functor.html#v:unzip

This results in the following build error:

DNS/Iterative/Imports.hs:14:5: error: [GHC-69158]
    Conflicting exports for ‘unzip’:
       ‘module Data.Functor’ exports ‘Data.Functor.unzip’
         imported from ‘Data.Functor’ at DNS/Iterative/Imports.hs:39:1-19
       ‘module Data.List’ exports ‘Data.List.unzip’
         imported from ‘Data.List’ at DNS/Iterative/Imports.hs:40:78-82
         (and originally defined in ‘GHC.List’)
   |
14 |     module Data.List,
   |     ^^^^^^^^^^^^^^^^
kazu-yamamoto commented 6 months ago

Thank you for pointing this out. Unfortunately, this introduces a warning:

DNS/Iterative/Imports.hs:39:1: warning: [-Wdodgy-imports]
    Module ‘Data.Functor’ does not export ‘unzip’
   |
39 | import Data.Functor hiding (unzip)

I'm now thinking how to fix this.

kazu-yamamoto commented 5 months ago

I could not find a good solution. So, just rebased and merged. Thank you for your contribution!