[GHC] #10963: Beginner-targeted language extension

GHC ghc-devs at haskell.org
Wed Apr 27 16:05:28 UTC 2016


#10963: Beginner-targeted language extension
-------------------------------------+-------------------------------------
        Reporter:  kanetw            |                Owner:
            Type:  feature request   |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2136
       Wiki Page:                    |
  [wiki:Design/GHCi/Type]            |
-------------------------------------+-------------------------------------

Comment (by aavogt):

 `:set +t` seems to have been forgotten. I think the defaulted type could
 be tacked on if you are shown a value, since that value was calculated
 with a particular instance. For example:

 {{{
 > :set +t
 > 1+1
 2 -- current output
 it :: Num a => a
 }}}

 {{{
 > :set +t
 > 1+1
 2 :: Integer -- proposed
 it :: Num a => a
 }}}


 This case shouldn't change because nothing was evaluated
 {{{
 > :set +t
 > let (x:xs) = [1 .. ]
 x :: (Num t, Enum t) => t
 xs :: (Num t, Enum t) => [t]
 }}}

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


More information about the ghc-tickets mailing list