Make :sprint, :print, and :force work with cyclical structures
> t = "hi" : t
> :force t
never completes, because GHC races around and around in a loop forever. It would seem better to keep a hashset of nodes that have already been visited to avoid getting stuck, and print out a reasonable representation of the graph.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.1 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |