[GHC] #14084: Strange behavior of GHC by writing the types in GHCi

GHC ghc-devs at haskell.org
Thu Aug 3 13:18:00 UTC 2017


#14084: Strange behavior of GHC by writing the types in GHCi
-------------------------------------+-------------------------------------
        Reporter:  vanto             |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  GHCi              |              Version:  8.0.2
      Resolution:  invalid           |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by hsyl20):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 This behavior is correct. It has nothing to do with `:set +t`.

 B: `:t 1:2` just shows the inferred type for `1:2`

 A:
 {{{
 Prelude> 1:2
 }}}

 is equivalent to
 {{{
 Prelude> let it = 1:2
 }}}
 which fails to type-check the inferred type for `1:2` if you don't enable
 FlexibleContexts.

 Please [https://downloads.haskell.org/~ghc/8.2.1/docs/html/users_guide/
 refer to the manual] and use
 [https://mail.haskell.org/mailman/listinfo/beginners this mailing-list]
 instead of the bug tracker when you don't understand GHC's behavior.

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


More information about the ghc-tickets mailing list