Skip to content

Wrong Template Haskell desugaring

This code

{-# LANGUAGE TemplateHaskell, PolyKinds, TypeFamilies #-}

module T9160 where

$( [d| class C (a :: k) where
          type F (a :: k) :: *
    |]
 )

yields

T9160.hs:5:4:
    Kind variable also used as type variable: ‘k_a2cl’
    In the declaration for class C_a2cj

which is utterly bogus.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information