seq is not cooperating with :sprint in GHCi as expected
I was playing around with strictness and performed following test:
Prelude> x = [True, False]
Prelude> :sprint x
x = _
Prelude> x `seq` True
True
Prelude> :sprint x
x = _
I completely don't understand why x = _ at this moment. seq must evaluate one level of x achieving x = True : _ to ensure that it is not undefined, so why is this information lost?
I am testing it on GHCi version 8.6.3, but it is not reproducible on other versions (checked on 8.4.4, 8.2.2 and 7..).
I have asked about it on SO, so if this behavior is intended I kindly ask for explaination here https://stackoverflow.com/questions/53898220/sprint-and-seq-together-missing-evaluation to let others know.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |