[GHC] #14515: "Same" higher-rank kind synonyms behave differently

GHC ghc-devs at haskell.org
Thu Nov 23 15:01:25 UTC 2017


#14515: "Same" higher-rank kind synonyms behave differently
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
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 Iceland_jack):

 The constructor isn't necessary to trigger it

 {{{#!hs
 {-# LANGUAGE RankNTypes #-}
 {-# LANGUAGE TypeInType #-}
 module Bug where

 import Data.Kind

 type HRank1 ty = forall k1. k1 -> ty
 type HRank2 ty = forall k2. k2 -> ty

 data HREFL11 :: HRank1 (HRank1 Type) -- FAILS
 data HREFL12 :: HRank1 (HRank2 Type)
 data HREFL21 :: HRank2 (HRank1 Type)
 data HREFL22 :: HRank2 (HRank2 Type) -- FAILS
 }}}

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


More information about the ghc-tickets mailing list