[GHC] #14002: Defining a function in GHCi results in different strictness behavior than defining it in a file

GHC ghc-devs at haskell.org
Thu Jul 20 20:15:13 UTC 2017


#14002: Defining a function in GHCi results in different strictness behavior than
defining it in a file
-------------------------------------+-------------------------------------
           Reporter:  cocreature     |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14002>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list