Skip to content

clean memory in GHCi

Suppose you have a program that fills all memory up so what GHCi crash by displaying the "out of memory" error. But you don't know. You run the programm and a few seconds after you stop it by pressing ctrl-c. Then you start another programm that is correct like computing a factorial and suddenly GHCi crash. GHCi crash because there is not enough memory. All the values of the first program remained in memory and have not been deleted. Can we have a command available from the prompt that clean the memory? For example, Prelude> :clean memory or Prelude> :clm in order to avoid restart GHCi.

Trac metadata
Trac field Value
Version 8.0.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
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