[GHC] #15831: DerivingVia allows bogus implicit quantification in `via` type

GHC ghc-devs at haskell.org
Mon Oct 29 18:13:46 UTC 2018


#15831: DerivingVia allows bogus implicit quantification in `via` type
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.6.1
      Resolution:                    |             Keywords:  deriving
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Poor/confusing    |  Unknown/Multiple
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * milestone:   => 8.8.1


Comment:

 I think I see what's going on here. The aforementioned validity check is
 currently implemented in the renamer (in
 [http://git.haskell.org/ghc.git/blob/331081b03f67c94b908136339aebf36d07d45c21:/compiler/rename/RnSource.hs#l1746
 rnAndReportFloatingViaTvs]), but the renamer is completely oblivious to
 the existence of inferred kind variables (such as `k` in the original
 example). This leads me to believe that the renamer is the wrong place to
 put this check, and that it should really live in the typechecker, where
 we do know about the existence of `k`.

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


More information about the ghc-tickets mailing list