Define SpecConstrAnnotation in GHC.Exts, and import it from there
Reason: avoid having to link the entire ghc package in modules that use compile-time annotations: import GHC.Exts( SpecConstrAnnotation ) {-# ANN type T ForceSpecConstr #-} It's a kind of bug that the package exporting SpecConstrAnnotation is linked even though it is only needed at compile time, but putting the data type declaration in GHC.Exts is a simple way to sidestep the problem See See Note [SpecConstrAnnotation] in SpecConstr
Please register or sign in to comment