[GHC] #9200: Milner-Mycroft failure at the kind level

GHC ghc-devs at haskell.org
Mon Jul 28 11:48:39 UTC 2014


#9200: Milner-Mycroft failure at the kind level
-------------------------------------+-------------------------------------
              Reporter:  ekmett      |            Owner:  goldfire
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.2
  (Type checker)                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHC         |  Related Tickets:
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 I've added a reply, as below.  Is it ok to remove the para about "non-
 parametric" equations?

 '''Simon:''' I agree that, since type syononyms can't be recursive except
 via a data type, if you use "A possible variation" below, then you can get
 away with saying that type synonyms cannot have CUSKs.  It seems a bit
 non-orthogonal; and could occasionally be tiresome.  Imagine
 {{{
 data T1 a b c = ...S...
 data T2 p q r = ...S...
 data T3 x y q = ...S...
 type S f g h = ...T1...T2...T3...
 }}}
 Then, since you can't decorate S with a CUSK, you might need to annotate
 all of T1, T2 and T3 with CUSKs.

 It would not be hard to say what a CUSK for a type synonym was: just wrap
 the whole RHS in a kind signature:
 {{{
 type T (a::k1) (b::k1->k2) = b a :: k2
 }}}
 I think I'd argue mildy for that, just to make the design orthogonal.

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


More information about the ghc-tickets mailing list