[GHC] #10045: type holes related ghc panic

GHC ghc-devs at haskell.org
Tue Mar 24 11:34:34 UTC 2015


#10045: type holes related ghc panic
-------------------------------------+-------------------------------------
        Reporter:  pacak             |                   Owner:  thomasw
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1-rc2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D646
-------------------------------------+-------------------------------------

Comment (by darchon):

 I'm terribly sorry for, once again, bringing up tickets late in the
 release cycle... but can the above fix be included in ghc 7.10? I'm
 getting:

 {{{
 ~/devel/test$ ghci Blah.hs
 GHCi, version 7.10.0.20150323: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling Blah             ( Blah.hs, interpreted )

 Blah.hs:7:17:
     Found hole ‘_’ with type: t2 -> a1 -> t3
     Where: ‘t2’ is a rigid type variable bound by
                 the inferred type of copy :: Num a1 => t2 -> a1 -> t3
                 at Blah.hs:8:9
            ‘t3’ is a rigid type variable bound by
                 the inferred type of copy :: Num a1 => t2 -> a1 -> t3
                 at Blah.hs:8:9
            ‘a1’ is a rigid type variable bound by
                 the inferred type of copy :: Num a1 => t2 -> a1 -> t3
                 at Blah.hs:8:9
     To use the inferred type, enable PartialTypeSignatures
     Relevant bindings include
       ws1 :: () (bound at Blah.hs:6:11)
       foo :: Meta -> t3 (bound at Blah.hs:6:1)
     In the type signature for ‘copy’: _
     In the expression:
       let
         copy :: _
         copy w from = copy w 1
       in copy ws1 1
     In an equation for ‘foo’:
         foo (Meta ws1)
           = let
               copy :: _
               copy w from = copy w 1
             in copy ws1 1

 Blah.hs:8:9:
     No instance for (Num a)
     When checking that ‘copy’ has the specified type
       copy :: forall t t1 a. t -> a -> t1
     Probable cause: the inferred type is ambiguous
     In the expression:
       let
         copy :: _
         copy w from = copy w 1
       in copy ws1 1
     In an equation for ‘foo’:
         foo (Meta ws1)
           = let
               copy :: _
               copy w from = copy w 1
             in copy ws1 1

 Blah.hs:9:13:
     Couldn't match expected type ‘t’ with actual type ‘()’
       ‘t’ is untouchable
         inside the constraints ()
         bound by the inferred type of foo :: Meta -> t1
         at Blah.hs:(6,1)-(9,17)ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.0.20150323 for x86_64-apple-darwin):
         No skolem info: t_avM[sk]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 Also, this is ''not'' mission critical for me! So if it's postponed to a
 later release then it's no problem.

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


More information about the ghc-tickets mailing list