[GHC] #14232: Invalid type signature prokoves error in GHCi

GHC ghc-devs at haskell.org
Thu Sep 14 15:28:53 UTC 2017


#14232: Invalid type signature prokoves error in GHCi
-------------------------------------+-------------------------------------
           Reporter:  walling        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  GHCi           |           Version:  8.2.1
           Keywords:                 |  Operating System:  MacOS X
       Architecture:  x86_64         |   Type of failure:  Poor/confusing
  (amd64)                            |  error message
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When I create and save a file with the following content (notice the
 missing arrow `->`):

 {{{#!hs
 f :: (String -> a) String -> a
 f g s = g s
 }}}

 ... it outputs this snippet in GHCi (copy-pasted from terminal):

 {{{
 $ ghci bug.hs
 GHCi, version 8.2.1: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling Main             ( Playground/bug.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-apple-darwin):
     repSplitAppTys
   String
   a_a1pl[sk:1]
   []
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:808:9 in ghc:Type

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

 >
 Leaving GHCi.
 }}}

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


More information about the ghc-tickets mailing list