[GHC] #15057: Lint types created by newFamInst

GHC ghc-devs at haskell.org
Thu Apr 19 15:54:07 UTC 2018


#15057: Lint types created by newFamInst
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.1
           Keywords:  TypeFamilies   |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #15012
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In #15012, we observed a terrible failure resulting from `newFamInst`
 creating a type family instance with an unbound type variable on the
 right-hand side. What's worse, `-dcore-lint` didn't catch it! Let's fix
 that by calling `lintType` on the types involved in `newFamInst`.

 A wrinkle in this plan is that `lintType` currently expands all type
 synonyms, but the offending type in #15012 had the unbound variable occur
 in a type synonym application, so expanding type synonyms would make this
 naughtiness seemingly vanish (from Core Lint's perspective). We should
 configure `lintType` so that one can control its type synonym expansion
 behavior.

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


More information about the ghc-tickets mailing list