Opened 4 years ago

Closed 4 years ago

#8579 closed bug (fixed)

Loading a module in GHCi affects shadowing

Reported by: monoidal Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: ghci/scripts/T8579
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


In GHCi we can redefine a data declaration; last definition counts. But loading a module has a side effect of bringing the first declaration to front:

λ> data A = X
λ> data A = Y
λ> :i A
data A = Y 	-- Defined at <interactive>:3:6
λ> :m Data.List
λ> :i A
data A = X 	-- Defined at <interactive>:2:6

Change History (2)

comment:1 Changed 4 years ago by Simon Peyton Jones <simonpj@…>

comment:2 Changed 4 years ago by simonpj

Resolution: fixed
Status: newclosed
Test Case: ghci/scripts/T8579

Thanks. Fixed as part of the fix to #8639

Note: See TracTickets for help on using tickets.