Copyright | (c) 2008 Benedikt Huber |
---|---|
License | BSD-style |
Maintainer | benedikt.huber@gmail.com |
Stability | experimental |
Portability | ghc |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Unary, binary and asssignment operators. Exported via AST.
Synopsis
- data CAssignOp
- assignBinop :: CAssignOp -> CBinaryOp
- data CBinaryOp
- isCmpOp :: CBinaryOp -> Bool
- isPtrOp :: CBinaryOp -> Bool
- isBitOp :: CBinaryOp -> Bool
- isLogicOp :: CBinaryOp -> Bool
- data CUnaryOp
- = CPreIncOp
- | CPreDecOp
- | CPostIncOp
- | CPostDecOp
- | CAdrOp
- | CIndOp
- | CPlusOp
- | CMinOp
- | CCompOp
- | CNegOp
- isEffectfulOp :: CUnaryOp -> Bool
Assignment operators
C assignment operators (K&R A7.17)
CAssignOp | |
CMulAssOp | |
CDivAssOp | |
CRmdAssOp | remainder and assignment |
CAddAssOp | |
CSubAssOp | |
CShlAssOp | |
CShrAssOp | |
CAndAssOp | |
CXorAssOp | |
COrAssOp |
Instances
Data CAssignOp Source # | |
Defined in Language.C.Syntax.Ops gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CAssignOp -> c CAssignOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CAssignOp # toConstr :: CAssignOp -> Constr # dataTypeOf :: CAssignOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CAssignOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CAssignOp) # gmapT :: (forall b. Data b => b -> b) -> CAssignOp -> CAssignOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CAssignOp -> r # gmapQ :: (forall d. Data d => d -> u) -> CAssignOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CAssignOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CAssignOp -> m CAssignOp # | |
Generic CAssignOp Source # | |
Show CAssignOp Source # | |
NFData CAssignOp Source # | |
Defined in Language.C.Syntax.Ops | |
Eq CAssignOp Source # | |
Ord CAssignOp Source # | |
Defined in Language.C.Syntax.Ops | |
Pretty CAssignOp Source # | |
type Rep CAssignOp Source # | |
Defined in Language.C.Syntax.Ops type Rep CAssignOp = D1 ('MetaData "CAssignOp" "Language.C.Syntax.Ops" "language-c-0.9.4-9yWFXod72jo4EfM9VWrwhH" 'False) (((C1 ('MetaCons "CAssignOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CMulAssOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CDivAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CRmdAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAddAssOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CSubAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CShlAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CShrAssOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CAndAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CXorAssOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "COrAssOp" 'PrefixI 'False) (U1 :: Type -> Type))))) |
assignBinop :: CAssignOp -> CBinaryOp Source #
Binary operators
C binary operators (K&R A7.6-15)
CMulOp | |
CDivOp | |
CRmdOp | remainder of division |
CAddOp | |
CSubOp | |
CShlOp | shift left |
CShrOp | shift right |
CLeOp | less |
CGrOp | greater |
CLeqOp | less or equal |
CGeqOp | greater or equal |
CEqOp | equal |
CNeqOp | not equal |
CAndOp | bitwise and |
CXorOp | exclusive bitwise or |
COrOp | inclusive bitwise or |
CLndOp | logical and |
CLorOp | logical or |
Instances
Data CBinaryOp Source # | |
Defined in Language.C.Syntax.Ops gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CBinaryOp -> c CBinaryOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CBinaryOp # toConstr :: CBinaryOp -> Constr # dataTypeOf :: CBinaryOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CBinaryOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CBinaryOp) # gmapT :: (forall b. Data b => b -> b) -> CBinaryOp -> CBinaryOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CBinaryOp -> r # gmapQ :: (forall d. Data d => d -> u) -> CBinaryOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CBinaryOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CBinaryOp -> m CBinaryOp # | |
Generic CBinaryOp Source # | |
Show CBinaryOp Source # | |
NFData CBinaryOp Source # | |
Defined in Language.C.Syntax.Ops | |
Eq CBinaryOp Source # | |
Ord CBinaryOp Source # | |
Defined in Language.C.Syntax.Ops | |
Pretty CBinaryOp Source # | |
type Rep CBinaryOp Source # | |
Defined in Language.C.Syntax.Ops type Rep CBinaryOp = D1 ('MetaData "CBinaryOp" "Language.C.Syntax.Ops" "language-c-0.9.4-9yWFXod72jo4EfM9VWrwhH" 'False) ((((C1 ('MetaCons "CMulOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CDivOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CRmdOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAddOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CSubOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CShlOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CShrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CLeOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CGrOp" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CLeqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CGeqOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CEqOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CNeqOp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CAndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CXorOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "COrOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CLndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CLorOp" 'PrefixI 'False) (U1 :: Type -> Type)))))) |
Unary operators
C unary operator (K&R A7.3-4)
CPreIncOp | prefix increment operator |
CPreDecOp | prefix decrement operator |
CPostIncOp | postfix increment operator |
CPostDecOp | postfix decrement operator |
CAdrOp | address operator |
CIndOp | indirection operator |
CPlusOp | prefix plus |
CMinOp | prefix minus |
CCompOp | one's complement |
CNegOp | logical negation |
Instances
Data CUnaryOp Source # | |
Defined in Language.C.Syntax.Ops gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CUnaryOp -> c CUnaryOp # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CUnaryOp # toConstr :: CUnaryOp -> Constr # dataTypeOf :: CUnaryOp -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CUnaryOp) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CUnaryOp) # gmapT :: (forall b. Data b => b -> b) -> CUnaryOp -> CUnaryOp # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CUnaryOp -> r # gmapQ :: (forall d. Data d => d -> u) -> CUnaryOp -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> CUnaryOp -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CUnaryOp -> m CUnaryOp # | |
Generic CUnaryOp Source # | |
Show CUnaryOp Source # | |
NFData CUnaryOp Source # | |
Defined in Language.C.Syntax.Ops | |
Eq CUnaryOp Source # | |
Ord CUnaryOp Source # | |
Defined in Language.C.Syntax.Ops | |
Pretty CUnaryOp Source # | |
type Rep CUnaryOp Source # | |
Defined in Language.C.Syntax.Ops type Rep CUnaryOp = D1 ('MetaData "CUnaryOp" "Language.C.Syntax.Ops" "language-c-0.9.4-9yWFXod72jo4EfM9VWrwhH" 'False) (((C1 ('MetaCons "CPreIncOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CPreDecOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CPostIncOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CPostDecOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CAdrOp" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CIndOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CPlusOp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CMinOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CCompOp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CNegOp" 'PrefixI 'False) (U1 :: Type -> Type))))) |
isEffectfulOp :: CUnaryOp -> Bool Source #