[GHC] #13835: ghci with ":set +t" should print type before starting evaluation

GHC ghc-devs at haskell.org
Fri Jun 16 17:01:47 UTC 2017


#13835: ghci with ":set +t" should print type before starting evaluation
-------------------------------------+-------------------------------------
           Reporter:  j.waldmann     |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:
           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:
-------------------------------------+-------------------------------------
 Not an actual bug, but questionable design perhaps.

 I think this is backwards, as static analysis comes before evaluation, not
 after:
 {{{
 Prelude> :set +t
 Prelude> reverse [True]
 [True]
 it :: [Bool]
 }}}

 When evaluation raises an exception, no type is printed.
 {{{
 Prelude> :set +t
 Prelude> True && undefined
 *** Exception: Prelude.undefined
 CallStack (from HasCallStack):
   error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err
   undefined, called at <interactive>:8:9 in interactive:Ghci4
 }}}

 For teaching (and for my own sanity) I'd much prefer output in logical
 succession.

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


More information about the ghc-tickets mailing list