[GHC] #15393: Regression: Detection of unused imports is imprecise (since GHC 8.0.1)

GHC ghc-devs at haskell.org
Fri Nov 23 19:04:27 UTC 2018


#15393: Regression: Detection of unused imports is imprecise (since GHC 8.0.1)
-------------------------------------+-------------------------------------
        Reporter:  SimonHengel       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.1
      Resolution:  duplicate         |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15393            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by jrp):

 Not sure whether this commit is breaking the current {{{validate --slow}}}
 build:

 {{{
 "inplace/bin/ghc-stage1" -hisuf p_hi -osuf  p_o -hcsuf p_hc -static -prof
 -eventlog  -O0 -H64m -Wall -fllvm-fill-undef-with-garbage    -Werror
 -this-unit-id containers-0.6.0.1 -hide-all-packages -i
 -ilibraries/containers/. -ilibraries/containers/dist-install/build
 -Ilibraries/containers/dist-install/build -ilibraries/containers/dist-
 install/build/./autogen -Ilibraries/containers/dist-
 install/build/./autogen -Ilibraries/containers/include
 -Ilibraries/containers/dist-install/build/include    -optP-include
 -optPlibraries/containers/dist-install/build/./autogen/cabal_macros.h
 -package-id array-0.5.2.0 -package-id base-4.12.0.0 -package-id
 deepseq-1.4.4.0 -package-id ghc-prim-0.5.3 -O2 -Wall -XHaskell98 -O
 -dcore-lint -dno-debug-output  -no-user-package-db -rtsopts  -Wno-
 deprecated-flags     -Wnoncanonical-monad-instances  -odir
 libraries/containers/dist-install/build -hidir libraries/containers/dist-
 install/build -stubdir libraries/containers/dist-install/build    -c
 libraries/containers/./Data/Sequence/Internal.hs -o libraries/containers
 /dist-install/build/Data/Sequence/Internal.p_o -dyno libraries/containers
 /dist-install/build/Data/Sequence/Internal.dyn_o

 libraries/containers/Data/Set/Internal.hs:239:1: error: [-Wunused-imports,
 -Werror=unused-imports]
     The import of ‘<>’ from module ‘Data.Semigroup’ is redundant
     |
 239 | import Data.Semigroup (Semigroup((<>), stimes),
 stimesIdempotentMonoid)
     |
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 make[1]: *** [libraries/containers/ghc.mk:4: libraries/containers/dist-
 install/build/Data/Set/Internal.p_o] Error 1
 make[1]: *** Waiting for unfinished jobs....

 libraries/containers/Data/IntSet/Internal.hs:198:1: error: [-Wunused-
 imports, -Werror=unused-imports]
     The import of ‘<>’ from module ‘Data.Semigroup’ is redundant
     |
 198 | import Data.Semigroup (Semigroup((<>), stimes),
 stimesIdempotentMonoid)
     |
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 libraries/containers/Data/IntSet/Internal.hs:220:1: error: [-Wunused-
 imports, -Werror=unused-imports]
     The import of ‘Data.Foldable’ is redundant
       except perhaps to import instances from ‘Data.Foldable’
     To import instances alone, use: import Data.Foldable()
     |
 220 | import Data.Foldable (Foldable())
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 make[1]: *** [libraries/containers/ghc.mk:4: libraries/containers/dist-
 install/build/Data/IntSet/Internal.p_o] Error 1
 make: *** [Makefile:128: all] Error 2
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15393#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list