[GHC] #15346: Core Lint error in GHC 8.6.1: From-type of Cast differs from type of enclosed expression

GHC ghc-devs at haskell.org
Fri Jul 6 14:56:58 UTC 2018


#15346: Core Lint error in GHC 8.6.1: From-type of Cast differs from type of
enclosed expression
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         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 Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"18cedbb55c7a0bdbfade4d28d3bb8927277df8d8/ghc"
 18cedbb5/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="18cedbb55c7a0bdbfade4d28d3bb8927277df8d8"
 Make a variant of mkCastErr for kind coercions

 Summary:
 I discovered when debugging #15346 that the Core Lint error
 message for ill typed casts always mentions types of enclosed
 //expressions//, even if the thing being casted is actually a type.
 This generalizes `mkCastErr` a bit to allow it to give the proper
 labelling for kind coercions.

 Test Plan: Run on failing program in #15346, read the Core Lint error

 Reviewers: goldfire, bgamari, simonpj

 Reviewed By: simonpj

 Subscribers: simonpj, rwbarton, thomie, carter

 Differential Revision: https://phabricator.haskell.org/D4940
 }}}

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


More information about the ghc-tickets mailing list