[GHC] #14348: Poly-kinded definitions silently introduce extra type arguments captured by TypeApplications

GHC ghc-devs at haskell.org
Fri Oct 13 13:49:37 UTC 2017


#14348: Poly-kinded definitions silently introduce extra type arguments captured by
TypeApplications
-------------------------------------+-------------------------------------
        Reporter:  gallais           |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:
      Resolution:  invalid           |  TypeApplications
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 gallais):

 If it's expected behaviour then I suppose what I'd really like is a
 distinction between "user-written" and "user-introduced". So that I may
 keep the kind annotations (which are helpful documentation when the kinds
 are complicated) whilst not having these extra arguments.

 E.g.

 {{{#!haskell
 data Wrap (k :: Kind) (a :: k)  -- user introduced: can be explicitly set
 via @
 data Wrap (a :: k)              -- user written: cannot be explicitly set
 via @

 wrap :: forall k (a :: k). Wrap a -- user introduced
 wrap :: forall (a :: k). Wrap a   -- user written
 }}}

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


More information about the ghc-tickets mailing list