Promotion of newtypes
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
newtype A = A Int
data B (x :: A)
The program above raises the error: A of kind * is not promotable
. The program compiles fine if we declare A
using data
instead of newtype
. Is there a good reason to prevent promotion of newtypes?
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |