| Copyright | (c) 2013-2016 Galois Inc. |
|---|---|
| License | BSD3 |
| Maintainer | cryptol@galois.com |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Cryptol.ModuleSystem.Renamer.Error
Description
Synopsis
- data RenamerError
- = MultipleSyms (Located PName) [Name]
- | UnboundName Namespace (Located PName)
- | OverlappingSyms [Name]
- | WrongNamespace Namespace Namespace (Located PName)
- | FixityError (Located Name) Fixity (Located Name) Fixity
- | OverlappingRecordUpdate (Located [Selector]) (Located [Selector])
- | InvalidDependency [DepName]
- | MultipleModParams Ident [Range]
- | InvalidFunctorImport (ImpName Name)
- | UnexpectedNest Range PName
- | ModuleKindMismatch Range (ImpName Name) ModKind ModKind
- data DepName
- depNameLoc :: DepName -> Maybe Range
- data ModKind
- data RenamerWarning
- = SymbolShadowed PName Name [Name]
- | UnusedName Name
- | PrefixAssocChanged PrefixOp (Expr Name) (Located Name) Fixity (Expr Name)
Documentation
data RenamerError Source #
Constructors
| MultipleSyms (Located PName) [Name] | Multiple imported symbols contain this name |
| UnboundName Namespace (Located PName) | Some name not bound to any definition |
| OverlappingSyms [Name] | An environment has produced multiple overlapping symbols |
| WrongNamespace Namespace Namespace (Located PName) | expected, actual. When a name is missing from the expected namespace, but exists in another |
| FixityError (Located Name) Fixity (Located Name) Fixity | When the fixity of two operators conflict |
| OverlappingRecordUpdate (Located [Selector]) (Located [Selector]) | When record updates overlap (e.g., |
| InvalidDependency [DepName] | Things that can't depend on each other |
| MultipleModParams Ident [Range] | Module parameters with the same name |
| InvalidFunctorImport (ImpName Name) | Can't import functors directly |
| UnexpectedNest Range PName | Nested modules were not supposed to appear here |
| ModuleKindMismatch Range (ImpName Name) ModKind ModKind | Exepcted one kind (first one) but found the other (second one) |
Instances
We use this to name dependencies. In addition to normal names we have a way to refer to module parameters and top-level module constraints, which have no explicit names
Constructors
| NamedThing Name | Something with a name |
| ModPath ModPath | The module at this path |
| ModParamName Range Ident | Note that the range is important not just for error reporting but to distinguish module parameters with the same name (e.g., in nested functors) |
| ConstratintAt Range | Identifed by location in source |
Instances
| Generic DepName Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Associated Types
| |||||
| Show DepName Source # | |||||
| PP DepName Source # | |||||
| NFData DepName Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error | |||||
| Eq DepName Source # | |||||
| Ord DepName Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error | |||||
| type Rep DepName Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error type Rep DepName = D1 ('MetaData "DepName" "Cryptol.ModuleSystem.Renamer.Error" "cryptol-3.5.0-HoSGjqdyafy4TMoEJgOBMg" 'False) ((C1 ('MetaCons "NamedThing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "ModPath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModPath))) :+: (C1 ('MetaCons "ModParamName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "ConstratintAt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range)))) | |||||
Constructors
| AFunctor | |
| ASignature | |
| AModule |
Instances
| Generic ModKind Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Associated Types
| |||||
| Show ModKind Source # | |||||
| PP ModKind Source # | |||||
| NFData ModKind Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error | |||||
| Eq ModKind Source # | |||||
| Ord ModKind Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error | |||||
| type Rep ModKind Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error type Rep ModKind = D1 ('MetaData "ModKind" "Cryptol.ModuleSystem.Renamer.Error" "cryptol-3.5.0-HoSGjqdyafy4TMoEJgOBMg" 'False) (C1 ('MetaCons "AFunctor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ASignature" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AModule" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data RenamerWarning Source #
Constructors
| SymbolShadowed PName Name [Name] | |
| UnusedName Name | |
| PrefixAssocChanged PrefixOp (Expr Name) (Located Name) Fixity (Expr Name) |
Instances
| Generic RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Associated Types
Methods from :: RenamerWarning -> Rep RenamerWarning x # to :: Rep RenamerWarning x -> RenamerWarning # | |||||
| Show RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Methods showsPrec :: Int -> RenamerWarning -> ShowS # show :: RenamerWarning -> String # showList :: [RenamerWarning] -> ShowS # | |||||
| PP RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Methods ppPrec :: Int -> RenamerWarning -> Doc Source # ppPrecWithAnnot :: [([Int], PPAnnot)] -> Int -> RenamerWarning -> Doc Source # | |||||
| NFData RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Methods rnf :: RenamerWarning -> () # | |||||
| Eq RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Methods (==) :: RenamerWarning -> RenamerWarning -> Bool # (/=) :: RenamerWarning -> RenamerWarning -> Bool # | |||||
| Ord RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error Methods compare :: RenamerWarning -> RenamerWarning -> Ordering # (<) :: RenamerWarning -> RenamerWarning -> Bool # (<=) :: RenamerWarning -> RenamerWarning -> Bool # (>) :: RenamerWarning -> RenamerWarning -> Bool # (>=) :: RenamerWarning -> RenamerWarning -> Bool # max :: RenamerWarning -> RenamerWarning -> RenamerWarning # min :: RenamerWarning -> RenamerWarning -> RenamerWarning # | |||||
| type Rep RenamerWarning Source # | |||||
Defined in Cryptol.ModuleSystem.Renamer.Error type Rep RenamerWarning = D1 ('MetaData "RenamerWarning" "Cryptol.ModuleSystem.Renamer.Error" "cryptol-3.5.0-HoSGjqdyafy4TMoEJgOBMg" 'False) (C1 ('MetaCons "SymbolShadowed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]))) :+: (C1 ('MetaCons "UnusedName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "PrefixAssocChanged" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PrefixOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr Name))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Expr Name))))))) | |||||