
#16089: seq is not cooperating with :sprint in GHCi as expected -------------------------------------+------------------------------------- Reporter: radrow | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 8.6.3 Keywords: seq sprint | Operating System: Linux strictness | Architecture: | Type of failure: Incorrect result Unknown/Multiple | at runtime Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I was playing around with strictness and performed following test: {{{#!hs 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16089 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler