[GHC] #14777: panic when using a function defined in terms of `error`

GHC ghc-devs at haskell.org
Mon Mar 12 08:46:19 UTC 2018


#14777: panic when using a function defined in terms of `error`
-------------------------------------+-------------------------------------
        Reporter:  zilinc            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tdammers):

 Replying to [comment:16 dfeuer]:
 > About all I can see about what's gone wrong is that something seems to
 be treating a type variable as though it were a term variable. That is, if
 I understand the `Var` type properly.

 I've been suspecting some sort of type/term confusion myself - neither
 `error` nor `undefined` should, conceptually speaking, throw the type
 checker off guard, and they shouldn't produce different behavior as far as
 the types are concerned (both `error "Something"` and `undefined` are
 `forall a. a`, essentially), yet swapping one for the other seems to
 toggle the panic.

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


More information about the ghc-tickets mailing list