language-c-0.10.1: Analysis and generation of C code

Copyright | (c) 2008 Benedikt Huber
License | BSD-style
Maintainer | benedikt.huber@gmail.com
Stability | alpha
Portability | ghc
Safe Haskell | None
Language | Haskell2010

Language.C.Analysis.SemError

Description

Errors in the semantic analysis

Synopsis

- newtype InvalidASTError = InvalidAST ErrorInfo
- invalidAST :: NodeInfo -> String -> InvalidASTError
- newtype BadSpecifierError = BadSpecifierError ErrorInfo
- badSpecifierError :: NodeInfo -> String -> BadSpecifierError
- data TypeMismatch = TypeMismatch String (NodeInfo, Type) (NodeInfo, Type)
- typeMismatch :: String -> (NodeInfo, Type) -> (NodeInfo, Type) -> TypeMismatch
- data RedefError = RedefError ErrorLevel RedefInfo
- data RedefInfo = RedefInfo String RedefKind NodeInfo NodeInfo
- data RedefKind
  - = DuplicateDef
  - | DiffKindRedecl
  - | ShadowedDef
  - | DisagreeLinkage
  - | NoLinkageOld
- redefinition :: ErrorLevel -> String -> RedefKind -> NodeInfo -> NodeInfo -> RedefError

# Documentation

newtype InvalidASTError Source #

InvalidASTError is caused by the violation of an invariant in the AST

Constructors

InvalidAST ErrorInfo |

#### Instances

Instances details

Show InvalidASTError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods showsPrec :: Int -> InvalidASTError -> ShowS Source # show :: InvalidASTError -> String Source # showList :: [InvalidASTError] -> ShowS Source #
Error InvalidASTError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods errorInfo :: InvalidASTError -> ErrorInfo Source # toError :: InvalidASTError -> CError Source # fromError :: CError -> Maybe InvalidASTError Source # changeErrorLevel :: InvalidASTError -> ErrorLevel -> InvalidASTError Source #

invalidAST :: NodeInfo -> String -> InvalidASTError Source #

newtype BadSpecifierError Source #

BadSpecifierError is caused by an invalid combination of specifiers

Constructors

BadSpecifierError ErrorInfo |

#### Instances

Instances details

Show BadSpecifierError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods showsPrec :: Int -> BadSpecifierError -> ShowS Source # show :: BadSpecifierError -> String Source # showList :: [BadSpecifierError] -> ShowS Source #
Error BadSpecifierError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods errorInfo :: BadSpecifierError -> ErrorInfo Source # toError :: BadSpecifierError -> CError Source # fromError :: CError -> Maybe BadSpecifierError Source # changeErrorLevel :: BadSpecifierError -> ErrorLevel -> BadSpecifierError Source #

badSpecifierError :: NodeInfo -> String -> BadSpecifierError Source #

data TypeMismatch Source #

Constructors

TypeMismatch String (NodeInfo, Type) (NodeInfo, Type) |

#### Instances

Instances details

Show TypeMismatch Source # |
Instance details Defined in Language.C.Analysis.SemError Methods showsPrec :: Int -> TypeMismatch -> ShowS Source # show :: TypeMismatch -> String Source # showList :: [TypeMismatch] -> ShowS Source #
Error TypeMismatch Source # |
Instance details Defined in Language.C.Analysis.SemError Methods errorInfo :: TypeMismatch -> ErrorInfo Source # toError :: TypeMismatch -> CError Source # fromError :: CError -> Maybe TypeMismatch Source # changeErrorLevel :: TypeMismatch -> ErrorLevel -> TypeMismatch Source #

typeMismatch :: String -> (NodeInfo, Type) -> (NodeInfo, Type) -> TypeMismatch Source #

data RedefError Source #

RedefError is caused by an invalid redefinition of the same identifier or type

Constructors

RedefError ErrorLevel RedefInfo |

#### Instances

Instances details

Show RedefError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods showsPrec :: Int -> RedefError -> ShowS Source # show :: RedefError -> String Source # showList :: [RedefError] -> ShowS Source #
Error RedefError Source # |
Instance details Defined in Language.C.Analysis.SemError Methods errorInfo :: RedefError -> ErrorInfo Source # toError :: RedefError -> CError Source # fromError :: CError -> Maybe RedefError Source # changeErrorLevel :: RedefError -> ErrorLevel -> RedefError Source #

data RedefInfo Source #

Constructors

RedefInfo String RedefKind NodeInfo NodeInfo |

data RedefKind Source #

Constructors

DuplicateDef |
DiffKindRedecl |
ShadowedDef |
DisagreeLinkage |
NoLinkageOld |

redefinition :: ErrorLevel -> String -> RedefKind -> NodeInfo -> NodeInfo -> RedefError Source #