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

GHC ghc-devs at haskell.org
Wed Aug 8 08:56:50 UTC 2018


#13835: ghci with ":set +t" should print type before starting evaluation
-------------------------------------+-------------------------------------
        Reporter:  j.waldmann        |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by j.waldmann):

 Here is a somewhat longer explanation:

 With the current behaviour (print type after value),
 a naive user (student) thinks

 * 1. expression e has value v, and then
 * 2. value v has type t,

 suggesting that 1 is somehow a precondition for 2,
 and that a type is a property of a value.

 But the truth is

 * 1. expression e has type t, and then
 * 2. expression e has value v.

 This 1 //is// a precondition for 2.

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


More information about the ghc-tickets mailing list