Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,248
    • Issues 5,248
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 561
    • Merge requests 561
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #509
Closed
Open
Issue created Feb 11, 2001 by spanne@trac-spanne

Deprecation warnings when exporting whole modules

Given the following modules:

-------------------------------------
module Foo(bar, baz) where
{-# DEPRECATED bar "use baz instead" #-}
bar, baz :: Int
bar = 42
baz = 43
-------------------------------------
module Blah(module Foo) where
import Foo
-------------------------------------

ghc-4.11 complains during compilation of Blah:

   ./Foo.hi:9: Warning: Variable `bar' is deprecated: use baz instead

This doesn't make sense, because bar is never explicitly mentioned in Blah.

This behaviour is caused by RnNames.exportsFromAvail which simply expands module exports as if every imported entity was explicitly mentioned in the export list. Perhaps AvailInfo should carry a bit more info?

The source location is not very helpful, either, but that's another bug... >:-)
Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking