-Wunticked-promoted-constructors doesn't warn for type-level list constructor
Summary
Compiling with -Wunticked-promoted-constructors
doesn't emit a warning when using :
or list literals without a '
prefix at the type level.
Steps to reproduce
{-# OPTIONS_GHC -Wunticked-promoted-constructors #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
type A = Int : '[]
type B = [Int, Bool]
Compiling this emits no warnings.
Expected behavior
Emit warnings:
Unticked promoted constructor: ‘:’.
Use ‘':’ instead of ‘:’.
Unticked promoted constructor: ‘[Int, Bool]’.
Use ‘'[Int, Bool]’ instead of ‘[Int, Bool]’.
Environment
- GHC version: tested with 8.10.4, 8.10.5 and 9.0.1
Optional:
- Operating System: Linux
- System Architecture: x86_64