[GHC] #9046: Panic in GHCi when using :print

GHC ghc-devs at haskell.org
Sun Jun 15 04:36:44 UTC 2014


#9046: Panic in GHCi when using :print
-------------------------------------+------------------------------------
        Reporter:  quchen            |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:  7.8.4
       Component:  GHCi              |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  GHCi crash        |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by bravit):

 No problem for unbounded polymorphic type variable:

 {{{
 $ ghci -fprint-explicit-foralls
 GHCi, version 7.8.2: http://www.haskell.org/ghc/  :? for help

 > :t length
 length :: forall a. [a] -> Int

 > :print length
 length = (_t1::[a] -> Int)

 > :t _t1
 _t1 :: [a] -> Int
 }}}
 But:
 {{{
 > :t read
 read :: forall a. Read a => String -> a

 > :print read
 read = (_t2::Read a1 => String -> a1)

 > :t _t2
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.8.2 for x86_64-unknown-linux):
         tcTyVarDetails a1{tv asM} [tv]
 }}}

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


More information about the ghc-tickets mailing list