Defining a function in GHCi results in different strictness behavior than defining it in a file
When defining a strict composition function in GHCi using
let f .:. g = seq f (seq g (\x -> f (g x)))
(omitting the let makes no difference) and then executing
seq (undefined .:. undefined) ()
this evaluates to ()
instead of bottom as I would have expected.
If .:.
is defined an a file and then loaded in GHCi the same statement evaluates to bottom. This also holds when .:.
is introduced via a let+in instead of a separate let statement.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |