[GHC] #14860: QuantifiedConstraints: Can't quantify constraint involving type family

GHC ghc-devs at haskell.org
Tue Feb 27 22:26:14 UTC 2018


#14860: QuantifiedConstraints: Can't quantify constraint involving type family
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.5
  checker)                           |             Keywords:
      Resolution:                    |  QuantifiedConstraints wipT2893
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 A skolem type variable is just like a type constructor.   It is equal to
 itself, nothing else.

 A type function application stands for what it reduces to.  It's not a
 rigid thing you can match against when matching in instances or type-
 family definitions.  We don't allow
 {{{
 type instance F (G a) = [a]
 }}}
 Why not?  Because the call `F (G Int)` would match the type instance --
 but could also reduce to something that wouldn't match it any more, which
 would be terrible.

 In contrast, skolem type variables have no such difficulty.

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


More information about the ghc-tickets mailing list