[GHC] #13335: Non-abstract types also have skolem nature

GHC ghc-devs at haskell.org
Fri Feb 24 23:20:17 UTC 2017


#13335: Non-abstract types also have skolem nature
-------------------------------------+-------------------------------------
           Reporter:  ezyang         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.2.1
          Component:  Compiler       |           Version:  8.1
  (Type checker)                     |
           Keywords:  backpack       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 In #12680, we determined that abstract types from signatures need to be
 treated like skolem variables.

 But it turns out other types from signatures also need to be treated like
 skolem variables too:

 {{{
 {-# LANGUAGE GADTs #-}
 unit p where
     signature M1 where
         data A = MkA
     signature M2 where
         data A = MkA
     module A where
         import qualified M1
         import qualified M2
         f :: M1.A ~ M2.A => a -> b
         f x = x
 }}}

 This is bad because these As could be the same thing in the end. I think
 the real, final fix, is to not test for "skolem abstractness" (as we do
 now), but just look and see if the Name for the TyCon is a name hole or
 not. Then we can eliminate skolem abstract completely.

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


More information about the ghc-tickets mailing list