{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralisedNewtypeDeriving #-} module Language.Haskell.Syntax.Basic where import Data.Data import Data.Eq import Data.Ord import Data.Bool import Data.Int (Int) import GHC.Data.FastString (FastString) import Control.DeepSeq {- ************************************************************************ * * Boxity * * ************************************************************************ -} data Boxity = Boxed | Unboxed deriving( Boxity -> Boxity -> Bool (Boxity -> Boxity -> Bool) -> (Boxity -> Boxity -> Bool) -> Eq Boxity forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: Boxity -> Boxity -> Bool == :: Boxity -> Boxity -> Bool $c/= :: Boxity -> Boxity -> Bool /= :: Boxity -> Boxity -> Bool Eq, Typeable Boxity Typeable Boxity => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity) -> (Boxity -> Constr) -> (Boxity -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity)) -> ((forall b. Data b => b -> b) -> Boxity -> Boxity) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r) -> (forall u. (forall d. Data d => d -> u) -> Boxity -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> Boxity -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity) -> Data Boxity Boxity -> Constr Boxity -> DataType (forall b. Data b => b -> b) -> Boxity -> Boxity forall a. Typeable a => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> Boxity -> u forall u. (forall d. Data d => d -> u) -> Boxity -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Boxity -> c Boxity $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Boxity $ctoConstr :: Boxity -> Constr toConstr :: Boxity -> Constr $cdataTypeOf :: Boxity -> DataType dataTypeOf :: Boxity -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Boxity) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Boxity) $cgmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity gmapT :: (forall b. Data b => b -> b) -> Boxity -> Boxity $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Boxity -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Boxity -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> Boxity -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Boxity -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Boxity -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Boxity -> m Boxity Data ) isBoxed :: Boxity -> Bool isBoxed :: Boxity -> Bool isBoxed Boxity Boxed = Bool True isBoxed Boxity Unboxed = Bool False {- ************************************************************************ * * Counts and indices * * ************************************************************************ -} -- | The width of an unboxed sum type SumWidth = Int -- | A *one-index* constructor tag -- -- Type of the tags associated with each constructor possibility or superclass -- selector type ConTag = Int {- ************************************************************************ * * Field Labels * * ************************************************************************ -} -- | Field labels are just represented as strings; -- they are not necessarily unique (even within a module) newtype FieldLabelString = FieldLabelString { FieldLabelString -> FastString field_label:: FastString } deriving (Typeable FieldLabelString Typeable FieldLabelString => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabelString -> c FieldLabelString) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabelString) -> (FieldLabelString -> Constr) -> (FieldLabelString -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabelString)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabelString)) -> ((forall b. Data b => b -> b) -> FieldLabelString -> FieldLabelString) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r) -> (forall u. (forall d. Data d => d -> u) -> FieldLabelString -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> FieldLabelString -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString) -> Data FieldLabelString FieldLabelString -> Constr FieldLabelString -> DataType (forall b. Data b => b -> b) -> FieldLabelString -> FieldLabelString forall a. Typeable a => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> FieldLabelString -> u forall u. (forall d. Data d => d -> u) -> FieldLabelString -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabelString forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabelString -> c FieldLabelString forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabelString) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabelString) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabelString -> c FieldLabelString gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabelString -> c FieldLabelString $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabelString gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabelString $ctoConstr :: FieldLabelString -> Constr toConstr :: FieldLabelString -> Constr $cdataTypeOf :: FieldLabelString -> DataType dataTypeOf :: FieldLabelString -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabelString) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabelString) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabelString) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabelString) $cgmapT :: (forall b. Data b => b -> b) -> FieldLabelString -> FieldLabelString gmapT :: (forall b. Data b => b -> b) -> FieldLabelString -> FieldLabelString $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> FieldLabelString -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> FieldLabelString -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FieldLabelString -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> FieldLabelString -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString Data, FieldLabelString -> FieldLabelString -> Bool (FieldLabelString -> FieldLabelString -> Bool) -> (FieldLabelString -> FieldLabelString -> Bool) -> Eq FieldLabelString forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: FieldLabelString -> FieldLabelString -> Bool == :: FieldLabelString -> FieldLabelString -> Bool $c/= :: FieldLabelString -> FieldLabelString -> Bool /= :: FieldLabelString -> FieldLabelString -> Bool Eq, FieldLabelString -> () (FieldLabelString -> ()) -> NFData FieldLabelString forall a. (a -> ()) -> NFData a $crnf :: FieldLabelString -> () rnf :: FieldLabelString -> () NFData) {- ************************************************************************ * * Field Labels * * ************************************************************************ -} -- | See Note [Roles] in GHC.Core.Coercion -- -- Order of constructors matters: the Ord instance coincides with the *super*typing -- relation on roles. data Role = Nominal | Representational | Phantom deriving (Role -> Role -> Bool (Role -> Role -> Bool) -> (Role -> Role -> Bool) -> Eq Role forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: Role -> Role -> Bool == :: Role -> Role -> Bool $c/= :: Role -> Role -> Bool /= :: Role -> Role -> Bool Eq, Eq Role Eq Role => (Role -> Role -> Ordering) -> (Role -> Role -> Bool) -> (Role -> Role -> Bool) -> (Role -> Role -> Bool) -> (Role -> Role -> Bool) -> (Role -> Role -> Role) -> (Role -> Role -> Role) -> Ord Role Role -> Role -> Bool Role -> Role -> Ordering Role -> Role -> Role forall a. Eq a => (a -> a -> Ordering) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> Bool) -> (a -> a -> a) -> (a -> a -> a) -> Ord a $ccompare :: Role -> Role -> Ordering compare :: Role -> Role -> Ordering $c< :: Role -> Role -> Bool < :: Role -> Role -> Bool $c<= :: Role -> Role -> Bool <= :: Role -> Role -> Bool $c> :: Role -> Role -> Bool > :: Role -> Role -> Bool $c>= :: Role -> Role -> Bool >= :: Role -> Role -> Bool $cmax :: Role -> Role -> Role max :: Role -> Role -> Role $cmin :: Role -> Role -> Role min :: Role -> Role -> Role Ord, Typeable Role Typeable Role => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role) -> (Role -> Constr) -> (Role -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role)) -> ((forall b. Data b => b -> b) -> Role -> Role) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r) -> (forall u. (forall d. Data d => d -> u) -> Role -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> Role -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Role -> m Role) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role) -> Data Role Role -> Constr Role -> DataType (forall b. Data b => b -> b) -> Role -> Role forall a. Typeable a => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> Role -> u forall u. (forall d. Data d => d -> u) -> Role -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Role -> m Role forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role $ctoConstr :: Role -> Constr toConstr :: Role -> Constr $cdataTypeOf :: Role -> DataType dataTypeOf :: Role -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) $cgmapT :: (forall b. Data b => b -> b) -> Role -> Role gmapT :: (forall b. Data b => b -> b) -> Role -> Role $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Role -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> Role -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Role -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Role -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Role -> m Role gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> Role -> m Role $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role Data) {- ************************************************************************ * * Source Strictness and Unpackedness * * ************************************************************************ -} -- | Source Strictness -- -- What strictness annotation the user wrote data SrcStrictness = SrcLazy -- ^ Lazy, ie '~' | SrcStrict -- ^ Strict, ie '!' | NoSrcStrict -- ^ no strictness annotation deriving (SrcStrictness -> SrcStrictness -> Bool (SrcStrictness -> SrcStrictness -> Bool) -> (SrcStrictness -> SrcStrictness -> Bool) -> Eq SrcStrictness forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: SrcStrictness -> SrcStrictness -> Bool == :: SrcStrictness -> SrcStrictness -> Bool $c/= :: SrcStrictness -> SrcStrictness -> Bool /= :: SrcStrictness -> SrcStrictness -> Bool Eq, Typeable SrcStrictness Typeable SrcStrictness => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness) -> (SrcStrictness -> Constr) -> (SrcStrictness -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness)) -> ((forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r) -> (forall u. (forall d. Data d => d -> u) -> SrcStrictness -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness) -> Data SrcStrictness SrcStrictness -> Constr SrcStrictness -> DataType (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness forall a. Typeable a => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u forall u. (forall d. Data d => d -> u) -> SrcStrictness -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness $ctoConstr :: SrcStrictness -> Constr toConstr :: SrcStrictness -> Constr $cdataTypeOf :: SrcStrictness -> DataType dataTypeOf :: SrcStrictness -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) $cgmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> SrcStrictness -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> SrcStrictness -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Data) -- | Source Unpackedness -- -- What unpackedness the user requested data SrcUnpackedness = SrcUnpack -- ^ {-# UNPACK #-} specified | SrcNoUnpack -- ^ {-# NOUNPACK #-} specified | NoSrcUnpack -- ^ no unpack pragma deriving (SrcUnpackedness -> SrcUnpackedness -> Bool (SrcUnpackedness -> SrcUnpackedness -> Bool) -> (SrcUnpackedness -> SrcUnpackedness -> Bool) -> Eq SrcUnpackedness forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: SrcUnpackedness -> SrcUnpackedness -> Bool == :: SrcUnpackedness -> SrcUnpackedness -> Bool $c/= :: SrcUnpackedness -> SrcUnpackedness -> Bool /= :: SrcUnpackedness -> SrcUnpackedness -> Bool Eq, Typeable SrcUnpackedness Typeable SrcUnpackedness => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness) -> (SrcUnpackedness -> Constr) -> (SrcUnpackedness -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness)) -> ((forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r) -> (forall u. (forall d. Data d => d -> u) -> SrcUnpackedness -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness) -> Data SrcUnpackedness SrcUnpackedness -> Constr SrcUnpackedness -> DataType (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness forall a. Typeable a => (forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a) -> (forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a) -> (a -> Constr) -> (a -> DataType) -> (forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c a)) -> (forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a)) -> ((forall b. Data b => b -> b) -> a -> a) -> (forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r) -> (forall u. (forall d. Data d => d -> u) -> a -> [u]) -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u) -> (forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> (forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> a -> m a) -> Data a forall u. Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u forall u. (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) $cgfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness gfoldl :: forall (c :: * -> *). (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness $cgunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness gunfold :: forall (c :: * -> *). (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness $ctoConstr :: SrcUnpackedness -> Constr toConstr :: SrcUnpackedness -> Constr $cdataTypeOf :: SrcUnpackedness -> DataType dataTypeOf :: SrcUnpackedness -> DataType $cdataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) dataCast1 :: forall (t :: * -> *) (c :: * -> *). Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *). Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) $cgmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness $cgmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r gmapQl :: forall r r'. (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r $cgmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r $cgmapQ :: forall u. (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] gmapQ :: forall u. (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u $cgmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness gmapM :: forall (m :: * -> *). Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness $cgmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness gmapMp :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness $cgmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness gmapMo :: forall (m :: * -> *). MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Data)