[GHC] #15172: Undecidable instances slip through

GHC ghc-devs at haskell.org
Mon May 21 10:33:57 UTC 2018


#15172: Undecidable instances slip through
-------------------------------------+-------------------------------------
           Reporter:  simonpj        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.2.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Consider
 {{{
 {-# LANGUAGE FlexibleInstances, TypeFamilies, ConstraintKinds #-}

 type family F a :: Constraint

 class C a where
 instance (F a) => C [[a]] where
 }}}
 This should be rejected because the `F a` constraint could expand to be
 arbitrarily large, depending on `F`.  There's simply a missing check in
 `checkInstTermination`.

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


More information about the ghc-tickets mailing list