Ticket #1400 (new bug)

Opened 6 years ago

Last modified 5 months ago

:set +r doesn't work for interpreted modules

Reported by: iampure@… Owned by: simonmar
Priority: normal Milestone: _|_
Component: GHCi Version: 6.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I expect

a = trace "a" 1 

and then evaluating a repeatedly to show: "a" 1

as a result. ghci seems to do this, but with larger programs this doesn't appear to happen.

I guess it's an implementation detail in that expressions don't "need" to be evaluated twice, but for debugging purposes it's vital that it does.

I want that the first run of an algorithm produces the same trace as any subsequent one. Especially when one uses the 6.7 debugger this is an issue. Essentially, I need to load another module first and then the module I am interested in and then set the breakpoints again. This is a UI nightmare.

The option +r "revert top-level expressions after each evaluation" seems to indicate that should do what I want, but it doesn't.

Change History

Changed 6 years ago by simonmar

  • priority changed from high to normal
  • difficulty changed from Unknown to Moderate (1 day)
  • summary changed from Incoherent cache behaviour ghci in combination with Debug.trace to :set +r doesn't work for interpreted modules
  • component changed from Compiler to GHCi
  • milestone set to 6.1

:set +r is supposed to do what you want, but it has never worked for interpreted code, only compiled code (and of course, the debugger only works for interpreted code, so that doesn't really help). I've changed the subject of the bug to reflect this.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple

Changed 4 years ago by igloo

  • milestone changed from 6.10 branch to _|_

Changed 4 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)

Changed 5 months ago by morabbin

  • failure set to None/Unknown

Has this become a wontfix?

Changed 5 months ago by simonmar

  • owner set to simonmar

I will add a note to the docs and close it.

Note: See TracTickets for help on using tickets.