Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
Iris
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 122
    • Issues 122
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 18
    • Merge Requests 18
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Iris
  • Iris
  • Issues
  • #366

Closed
Open
Opened Oct 16, 2020 by Ralf Jung@jungOwner

`Export` everywhere does not permit consistent shadowing

When using Export, even if imports are ordered consistently, there is sometimes no way to obtain consistent shadowing:


From stdpp Require base.
Module or.
  Export stdpp.base.
  Definition or_comm := 10.
End or.
Module and.
  Export stdpp.base.
  Definition and_comm := 11.
End and.
Module A.
  Import or and.
  Locate or_comm.
  (*
                    
  Constant stdpp.base.or_comm
  Constant Coq.Init.Logic.or_comm (shorter name to refer to it in current context is Logic.or_comm)
  Constant Top.or.or_comm (shorter name to refer to it in current context is or.or_comm)
  *)
  Locate and_comm.
  (*
                    
  Constant Top.and.and_comm
  Constant Coq.Init.Logic.and_comm (shorter name to refer to it in current context is Logic.and_comm)
  Constant stdpp.base.and_comm (shorter name to refer to it in current context is base.and_comm)
  *)
End A. 

Here, importing and overwrites or_comm because of the stdpp.base export.

I think the only way to avoid this is to avoid Exporting except when the re-exported symbols are conceptually really part of that library (such as stdpp.prelude).

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: iris/iris#366