Define SpecConstrAnnotation in GHC.Exts, and import it from there
authorsimonpj@microsoft.com <unknown>
Mon, 18 Oct 2010 13:57:46 +0000 (13:57 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 18 Oct 2010 13:57:46 +0000 (13:57 +0000)
commit6648babb973c46373fff1b74161b33ab68a13130
treefbb4cfc61cae80b4837dd49caa896967d37b148c
parent9a47b3820b1cb381ce1dc94fe25fac600c4d10a5
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
compiler/specialise/SpecConstr.lhs