Language.C.Analysis.SemError

language-c-0.5.0: 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 | Haskell98

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 #

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

Constructors

InvalidAST ErrorInfo |

Instances

Show InvalidASTError # |
Methods showsPrec :: Int -> InvalidASTError -> ShowS # show :: InvalidASTError -> String # showList :: [InvalidASTError] -> ShowS #
Error InvalidASTError # |
Methods errorInfo :: InvalidASTError -> ErrorInfo # toError :: InvalidASTError -> CError # fromError :: CError -> Maybe InvalidASTError # changeErrorLevel :: InvalidASTError -> ErrorLevel -> InvalidASTError #

invalidAST :: NodeInfo -> String -> InvalidASTError #

newtype BadSpecifierError #

BadSpecifierError is caused by an invalid combination of specifiers

Constructors

BadSpecifierError ErrorInfo |

Instances

Show BadSpecifierError # |
Methods showsPrec :: Int -> BadSpecifierError -> ShowS # show :: BadSpecifierError -> String # showList :: [BadSpecifierError] -> ShowS #
Error BadSpecifierError # |
Methods errorInfo :: BadSpecifierError -> ErrorInfo # toError :: BadSpecifierError -> CError # fromError :: CError -> Maybe BadSpecifierError # changeErrorLevel :: BadSpecifierError -> ErrorLevel -> BadSpecifierError #

badSpecifierError :: NodeInfo -> String -> BadSpecifierError #

data TypeMismatch #

Constructors

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

Instances

Show TypeMismatch # |
Methods showsPrec :: Int -> TypeMismatch -> ShowS # show :: TypeMismatch -> String # showList :: [TypeMismatch] -> ShowS #
Error TypeMismatch # |
Methods errorInfo :: TypeMismatch -> ErrorInfo # toError :: TypeMismatch -> CError # fromError :: CError -> Maybe TypeMismatch # changeErrorLevel :: TypeMismatch -> ErrorLevel -> TypeMismatch #

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

data RedefError #

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

Constructors

RedefError ErrorLevel RedefInfo |

Instances

Show RedefError # |
Methods showsPrec :: Int -> RedefError -> ShowS # show :: RedefError -> String # showList :: [RedefError] -> ShowS #
Error RedefError # |
Methods errorInfo :: RedefError -> ErrorInfo # toError :: RedefError -> CError # fromError :: CError -> Maybe RedefError # changeErrorLevel :: RedefError -> ErrorLevel -> RedefError #

data RedefInfo #

Constructors

RedefInfo String RedefKind NodeInfo NodeInfo |

data RedefKind #

Constructors

DuplicateDef |
DiffKindRedecl |
ShadowedDef |
DisagreeLinkage |
NoLinkageOld |

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