[GHC] #15816: Visible kind applications + data family: `U :: Type' said to be of kind `k0 -> k1` in error message

#15816: Visible kind applications + data family: `U :: Type' said to be of kind `k0 -> k1` in error message -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Keywords: | Operating System: Unknown/Multiple TypeApplications | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Using the [https://phabricator.haskell.org/D5229 visible kind applications (D5229)] (#12045) patch. GHC erroneously calls `U :: Type` a "function" of kind `k0 -> k1` if I understand this right, {{{ $ ghci GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help Prelude> :set prompt "> "
import Data.Kind (Type)
:set -XTypeFamilies :set -XTypeApplications
data family U :: Type data instance U @Int
<interactive>:7:1: error: • Cannot apply function of kind ‘k0 -> k1’ to visible kind argument ‘Int’ • In the data instance declaration for ‘U’
}}} I expect something like "Cannot apply type `U` to visible kind argument `Int`" or {{{
data instance U Int = MkU
<interactive>:7:1: error: • Expected kind ‘* -> *’, but ‘U’ has kind ‘*’ • In the data instance declaration for ‘U’
}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15816 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15816: Visible kind applications + data family: `U :: Type' said to be of kind `k0 -> k1` in error message -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * cc: mnguyen (added) Comment: This one looks like a legit bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15816#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15816: Visible kind applications + data family: `U :: Type' said to be of kind `k0
-> k1` in error message
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.6.1
Resolution: fixed | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_fail/T15816
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5229
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => closed
* testcase: => typecheck/should_fail/T15816
* differential: => Phab:D5229
* resolution: => fixed
* milestone: => 8.8.1
Comment:
This was fixed in
[https://gitlab.haskell.org/ghc/ghc/commit/17bd163566153babbf51adaff8397f948a...
17bd163566153babbf51adaff8397f948ae363ca]:
{{{
Author: mynguyen

#15816: Visible kind applications + data family: `U :: Type' said to be of kind `k0
-> k1` in error message
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.6.1
Resolution: fixed | Keywords:
| TypeApplications
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| typecheck/should_fail/T15816
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5229
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg
participants (1)
-
GHC