module DDC.Core.Annot.AnTEC
( AnTEC (..)
, fromAnT)
where
import DDC.Type.Compounds
import DDC.Type.Exp
import DDC.Base.Pretty
import Control.DeepSeq
import Data.Typeable
import DDC.Core.Annot.AnT (AnT)
import qualified DDC.Core.Annot.AnT as AnT
data AnTEC a n
= AnTEC
{ annotType :: (Type n)
, annotEffect :: (Effect n)
, annotClosure :: (Closure n)
, annotTail :: a }
deriving (Show, Typeable)
fromAnT :: AnT a n -> AnTEC a n
fromAnT (AnT.AnT t a)
= (AnTEC t (tBot kEffect) (tBot kClosure) a)
instance (NFData a, NFData n) => NFData (AnTEC a n) where
rnf !an
= rnf (annotType an)
`seq` rnf (annotEffect an)
`seq` rnf (annotClosure an)
`seq` rnf (annotTail an)
instance Pretty (AnTEC a n) where
ppr _ = text "AnTEC"