[GHC] #16334: Named wildcards in kinds

GHC ghc-devs at haskell.org
Sun Feb 17 14:26:14 UTC 2019


#16334: Named wildcards in kinds
-------------------------------------+-------------------------------------
           Reporter:  int-index      |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.4.4
  (Type checker)                     |
           Keywords:                 |  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:
-------------------------------------+-------------------------------------
 This works:

 {{{
 Prelude> :set -XNamedWildCards -XPartialTypeSignatures -XPolyKinds
 Prelude> k :: (Int :: _); k = 42

 <interactive>:2:14: warning: [-Wpartial-type-signatures]
     • Found type wildcard ‘_’ standing for ‘*’
     • In the type signature: k :: (Int :: _)
 }}}

 And this doesn't:

 {{{
 Prelude> k :: (Int :: _t); k = 42

 <interactive>:3:7: error:
     • Expected kind ‘_t’, but ‘Int’ has kind ‘*’
     • In the type signature: k :: (Int :: _t)
 }}}

 The issue, I suspect, is in `partition_nwcs`, which ignores kind variables
 for some reason. I plan to fix it as part of
 https://gitlab.haskell.org/ghc/ghc/merge_requests/361

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


More information about the ghc-tickets mailing list