[GHC] #13983: Type synonym referred to as datatype in error message

GHC ghc-devs at haskell.org
Sun Jul 16 05:01:38 UTC 2017


#13983: Type synonym referred to as datatype in error message
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
  (Type checker)                     |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Poor/confusing
  Unknown/Multiple                   |  error message
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 To reproduce the issue, compile this file with GHC 8.0.1, 8.0.2, 8.2.1, or
 HEAD:

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

 import Data.Proxy

 type Wat = forall (a :: k). Proxy a
 }}}

 {{{
 GHCi, version 8.3.20170706: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Bug              ( Bug.hs, interpreted )

 Bug.hs:7:1: error:
     • Kind variable ‘k’ is implicitly bound in datatype
       ‘Wat’, but does not appear as the kind of any
       of its type variables. Perhaps you meant
       to bind it (with TypeInType) explicitly somewhere?
       Type variables with inferred kinds: (k :: *)
     • In the type declaration for ‘Wat’
   |
 7 | type Wat = forall (a :: k). Proxy a
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 }}}

 The error message mistakenly refers to `Wat` as a datatype.

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


More information about the ghc-tickets mailing list