cryptol-2.8.0: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2016 Galois Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Cryptol.ModuleSystem.Renamer

Description

Synopsis

- data NamingEnv
- shadowing :: NamingEnv -> NamingEnv -> NamingEnv
- class BindsNames a where
  - namingEnv :: a -> BuildNamingEnv
- data InModule a = InModule !ModName a
- namingEnv' :: BindsNames a => a -> Supply -> (NamingEnv, Supply)
- checkNamingEnv :: NamingEnv -> ([RenamerError], [RenamerWarning])
- shadowNames :: BindsNames env => env -> RenameM a -> RenameM a
- class Rename f where
  - rename :: f PName -> RenameM (f Name)
- runRenamer :: Supply -> ModName -> NamingEnv -> RenameM a -> (Either [RenamerError] (a, Supply), [RenamerWarning])
- data RenameM a
- data RenamerError
  - = MultipleSyms (Located PName) [Name] NameDisp
  - | UnboundExpr (Located PName) NameDisp
  - | UnboundType (Located PName) NameDisp
  - | OverlappingSyms [Name] NameDisp
  - | ExpectedValue (Located PName) NameDisp
  - | ExpectedType (Located PName) NameDisp
  - | FixityError (Located Name) Fixity (Located Name) Fixity NameDisp
  - | InvalidConstraint (Type PName) NameDisp
  - | MalformedBuiltin (Type PName) PName NameDisp
  - | BoundReservedType PName (Maybe Range) Doc NameDisp
  - | OverlappingRecordUpdate (Located [Selector]) (Located [Selector]) NameDisp
- data RenamerWarning
  - = SymbolShadowed Name [Name] NameDisp
  - | UnusedName Name NameDisp
- renameVar :: PName -> RenameM Name
- renameType :: PName -> RenameM Name
- renameModule :: Module PName -> RenameM (NamingEnv, Module Name)

# Documentation

data NamingEnv Source #

#### Instances

Instances details

Show NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods showsPrec :: Int -> NamingEnv -> ShowS Source # show :: NamingEnv -> String Source # showList :: [NamingEnv] -> ShowS Source #
Generic NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Associated Types type Rep NamingEnv :: Type -> Type Source # Methods from :: NamingEnv -> Rep NamingEnv x Source # to :: Rep NamingEnv x -> NamingEnv Source #
Semigroup NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods (<>) :: NamingEnv -> NamingEnv -> NamingEnv Source # sconcat :: NonEmpty NamingEnv -> NamingEnv Source # stimes :: Integral b => b -> NamingEnv -> NamingEnv Source #
Monoid NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods mempty :: NamingEnv Source # mappend :: NamingEnv -> NamingEnv -> NamingEnv Source # mconcat :: [NamingEnv] -> NamingEnv Source #
NFData NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods rnf :: NamingEnv -> () Source #
BindsNames NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: NamingEnv -> BuildNamingEnv Source #
type Rep NamingEnv Source # |

Instance details

Defined in Cryptol.ModuleSystem.NamingEnv

type Rep NamingEnv = D1 ('MetaData "NamingEnv" "Cryptol.ModuleSystem.NamingEnv" "cryptol-2.8.0-11Z6ZaBuQbo1UTYpHYMeUg" 'False) (C1 ('MetaCons "NamingEnv" 'PrefixI 'True) (S1 ('MetaSel ('Just "neExprs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PName [Name])) :*: S1 ('MetaSel ('Just "neTypes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map PName [Name]))))

shadowing :: NamingEnv -> NamingEnv -> NamingEnv Source #

Like mappend, but when merging, prefer values on the lhs.

class BindsNames a where Source #

Things that define exported names.

Methods

namingEnv :: a -> BuildNamingEnv Source #

#### Instances

Instances details

BindsNames ImportIface Source # | Produce a naming environment from an interface file, that contains a mapping only from unqualified names to qualified ones.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: ImportIface -> BuildNamingEnv Source #
BindsNames NamingEnv Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: NamingEnv -> BuildNamingEnv Source #
BindsNames a => BindsNames [a] Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: [a] -> BuildNamingEnv Source #
BindsNames a => BindsNames (Maybe a) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: Maybe a -> BuildNamingEnv Source #
BindsNames (TParam PName) Source # | Generate the naming environment for a type parameter.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: TParam PName -> BuildNamingEnv Source #
BindsNames (Schema PName) Source # | Generate a type renaming environment from the parameters that are bound by this schema.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: Schema PName -> BuildNamingEnv Source #
BindsNames (Module PName) Source # | The naming environment for a single module. This is the mapping from unqualified names to fully qualified names with uniques.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: Module PName -> BuildNamingEnv Source #
BindsNames (InModule (PrimType PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (PrimType PName) -> BuildNamingEnv Source #
BindsNames (InModule (Newtype PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Newtype PName) -> BuildNamingEnv Source #
BindsNames (InModule (Bind PName)) Source # | Introduce the name
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Bind PName) -> BuildNamingEnv Source #
BindsNames (InModule (ParameterFun PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (ParameterFun PName) -> BuildNamingEnv Source #
BindsNames (InModule (ParameterType PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (ParameterType PName) -> BuildNamingEnv Source #
BindsNames (InModule (Decl PName)) Source # | The naming environment for a single declaration.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Decl PName) -> BuildNamingEnv Source #
BindsNames (InModule (TopDecl PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (TopDecl PName) -> BuildNamingEnv Source #

data InModule a Source #

Constructors

InModule !ModName a |

#### Instances

Instances details

Functor InModule Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods fmap :: (a -> b) -> InModule a -> InModule b Source # (<$) :: a -> InModule b -> InModule a Source #
Foldable InModule Source # |

Instance details

Defined in Cryptol.ModuleSystem.NamingEnv

Methods

fold :: Monoid m => InModule m -> m Source #

foldMap :: Monoid m => (a -> m) -> InModule a -> m Source #

foldMap' :: Monoid m => (a -> m) -> InModule a -> m Source #

foldr :: (a -> b -> b) -> b -> InModule a -> b Source #

foldr' :: (a -> b -> b) -> b -> InModule a -> b Source #

foldl :: (b -> a -> b) -> b -> InModule a -> b Source #

foldl' :: (b -> a -> b) -> b -> InModule a -> b Source #

foldr1 :: (a -> a -> a) -> InModule a -> a Source #

foldl1 :: (a -> a -> a) -> InModule a -> a Source #

toList :: InModule a -> [a] Source #

null :: InModule a -> Bool Source #

length :: InModule a -> Int Source #

elem :: Eq a => a -> InModule a -> Bool Source #

maximum :: Ord a => InModule a -> a Source #

minimum :: Ord a => InModule a -> a Source #

sum :: Num a => InModule a -> a Source #

product :: Num a => InModule a -> a Source #

Traversable InModule Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods traverse :: Applicative f => (a -> f b) -> InModule a -> f (InModule b) Source # sequenceA :: Applicative f => InModule (f a) -> f (InModule a) Source # mapM :: Monad m => (a -> m b) -> InModule a -> m (InModule b) Source # sequence :: Monad m => InModule (m a) -> m (InModule a) Source #
Show a => Show (InModule a) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods showsPrec :: Int -> InModule a -> ShowS Source # show :: InModule a -> String Source # showList :: [InModule a] -> ShowS Source #
BindsNames (InModule (PrimType PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (PrimType PName) -> BuildNamingEnv Source #
BindsNames (InModule (Newtype PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Newtype PName) -> BuildNamingEnv Source #
BindsNames (InModule (Bind PName)) Source # | Introduce the name
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Bind PName) -> BuildNamingEnv Source #
BindsNames (InModule (ParameterFun PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (ParameterFun PName) -> BuildNamingEnv Source #
BindsNames (InModule (ParameterType PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (ParameterType PName) -> BuildNamingEnv Source #
BindsNames (InModule (Decl PName)) Source # | The naming environment for a single declaration.
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (Decl PName) -> BuildNamingEnv Source #
BindsNames (InModule (TopDecl PName)) Source # |
Instance details Defined in Cryptol.ModuleSystem.NamingEnv Methods namingEnv :: InModule (TopDecl PName) -> BuildNamingEnv Source #

namingEnv' :: BindsNames a => a -> Supply -> (NamingEnv, Supply) Source #

Generate a `NamingEnv` using an explicit supply.

checkNamingEnv :: NamingEnv -> ([RenamerError], [RenamerWarning]) Source #

Throw errors for any names that overlap in a rewrite environment.

shadowNames :: BindsNames env => env -> RenameM a -> RenameM a Source #

Shadow the current naming environment with some more names.

class Rename f where Source #

Methods

rename :: f PName -> RenameM (f Name) Source #

#### Instances

Instances details

Rename Prop Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Prop PName -> RenameM (Prop Name) Source #
Rename Type Source # | Resolve fixity, then rename the resulting type.
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Type PName -> RenameM (Type Name) Source #
Rename TParam Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: TParam PName -> RenameM (TParam Name) Source #
Rename Schema Source # | Rename a schema, assuming that none of its type variables are already in scope.
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Schema PName -> RenameM (Schema Name) Source #
Rename Pattern Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Pattern PName -> RenameM (Pattern Name) Source #
Rename Match Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Match PName -> RenameM (Match Name) Source #
Rename TypeInst Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: TypeInst PName -> RenameM (TypeInst Name) Source #
Rename UpdField Source # | Note that after this point the `->` updates have an explicit function and there are no more nested updates.
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: UpdField PName -> RenameM (UpdField Name) Source #
Rename Expr Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Expr PName -> RenameM (Expr Name) Source #
Rename PrimType Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: PrimType PName -> RenameM (PrimType Name) Source #
Rename Newtype Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Newtype PName -> RenameM (Newtype Name) Source #
Rename BindDef Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: BindDef PName -> RenameM (BindDef Name) Source #
Rename Bind Source # | Rename a binding.
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Bind PName -> RenameM (Bind Name) Source #
Rename PropSyn Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: PropSyn PName -> RenameM (PropSyn Name) Source #
Rename TySyn Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: TySyn PName -> RenameM (TySyn Name) Source #
Rename ParameterFun Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: ParameterFun PName -> RenameM (ParameterFun Name) Source #
Rename ParameterType Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: ParameterType PName -> RenameM (ParameterType Name) Source #
Rename Decl Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: Decl PName -> RenameM (Decl Name) Source #
Rename TopDecl Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rename :: TopDecl PName -> RenameM (TopDecl Name) Source #

runRenamer :: Supply -> ModName -> NamingEnv -> RenameM a -> (Either [RenamerError] (a, Supply), [RenamerWarning]) Source #

data RenameM a Source #

#### Instances

Instances details

Monad RenameM Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods (>>=) :: RenameM a -> (a -> RenameM b) -> RenameM b Source # (>>) :: RenameM a -> RenameM b -> RenameM b Source # return :: a -> RenameM a Source #
Functor RenameM Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods fmap :: (a -> b) -> RenameM a -> RenameM b Source # (<$) :: a -> RenameM b -> RenameM a Source #
Applicative RenameM Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods pure :: a -> RenameM a Source # (<*>) :: RenameM (a -> b) -> RenameM a -> RenameM b Source # liftA2 :: (a -> b -> c) -> RenameM a -> RenameM b -> RenameM c Source # (*>) :: RenameM a -> RenameM b -> RenameM b Source # (<*) :: RenameM a -> RenameM b -> RenameM a Source #
FreshM RenameM Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods liftSupply :: (Supply -> (a, Supply)) -> RenameM a Source #
Semigroup a => Semigroup (RenameM a) Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods (<>) :: RenameM a -> RenameM a -> RenameM a Source # sconcat :: NonEmpty (RenameM a) -> RenameM a Source # stimes :: Integral b => b -> RenameM a -> RenameM a Source #
(Semigroup a, Monoid a) => Monoid (RenameM a) Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods mempty :: RenameM a Source # mappend :: RenameM a -> RenameM a -> RenameM a Source # mconcat :: [RenameM a] -> RenameM a Source #

data RenamerError Source #

Constructors

MultipleSyms (Located PName) [Name] NameDisp | Multiple imported symbols contain this name
UnboundExpr (Located PName) NameDisp | Expression name is not bound to any definition
UnboundType (Located PName) NameDisp | Type name is not bound to any definition
OverlappingSyms [Name] NameDisp | An environment has produced multiple overlapping symbols
ExpectedValue (Located PName) NameDisp | When a value is expected from the naming environment, but one or more types exist instead.
ExpectedType (Located PName) NameDisp | When a type is missing from the naming environment, but one or more values exist with the same name.
FixityError (Located Name) Fixity (Located Name) Fixity NameDisp | When the fixity of two operators conflict
InvalidConstraint (Type PName) NameDisp | When it's not possible to produce a Prop from a Type.
MalformedBuiltin (Type PName) PName NameDisp | When a builtin type/type-function is used incorrectly.
BoundReservedType PName (Maybe Range) Doc NameDisp | When a builtin type is named in a binder.
OverlappingRecordUpdate (Located [Selector]) (Located [Selector]) NameDisp | When record updates overlap (e.g., `{ r | x = e1, x.y = e2 }`)

#### Instances

Instances details

Show RenamerError Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods showsPrec :: Int -> RenamerError -> ShowS Source # show :: RenamerError -> String Source # showList :: [RenamerError] -> ShowS Source #
Generic RenamerError Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Associated Types type Rep RenamerError :: Type -> Type Source # Methods from :: RenamerError -> Rep RenamerError x Source # to :: Rep RenamerError x -> RenamerError Source #
NFData RenamerError Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rnf :: RenamerError -> () Source #
PP RenamerError Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods ppPrec :: Int -> RenamerError -> Doc Source #
type Rep RenamerError Source # |

Instance details

Defined in Cryptol.ModuleSystem.Renamer

type Rep RenamerError = D1 ('MetaData "RenamerError" "Cryptol.ModuleSystem.Renamer" "cryptol-2.8.0-11Z6ZaBuQbo1UTYpHYMeUg" 'False) (((C1 ('MetaCons "MultipleSyms" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))) :+: C1 ('MetaCons "UnboundExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))) :+: (C1 ('MetaCons "UnboundType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)) :+: (C1 ('MetaCons "OverlappingSyms" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)) :+: C1 ('MetaCons "ExpectedValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))))) :+: ((C1 ('MetaCons "ExpectedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)) :+: (C1 ('MetaCons "FixityError" 'PrefixI 'False) ((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 (Located Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)))) :+: C1 ('MetaCons "InvalidConstraint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type PName)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)))) :+: (C1 ('MetaCons "MalformedBuiltin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type PName)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))) :+: (C1 ('MetaCons "BoundReservedType" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Range))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Doc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))) :+: C1 ('MetaCons "OverlappingRecordUpdate" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located [Selector])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located [Selector])) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)))))))

data RenamerWarning Source #

Constructors

SymbolShadowed Name [Name] NameDisp |
UnusedName Name NameDisp |

#### Instances

Instances details

Show RenamerWarning Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods showsPrec :: Int -> RenamerWarning -> ShowS Source # show :: RenamerWarning -> String Source # showList :: [RenamerWarning] -> ShowS Source #
Generic RenamerWarning Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Associated Types type Rep RenamerWarning :: Type -> Type Source # Methods from :: RenamerWarning -> Rep RenamerWarning x Source # to :: Rep RenamerWarning x -> RenamerWarning Source #
NFData RenamerWarning Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods rnf :: RenamerWarning -> () Source #
PP RenamerWarning Source # |
Instance details Defined in Cryptol.ModuleSystem.Renamer Methods ppPrec :: Int -> RenamerWarning -> Doc Source #
type Rep RenamerWarning Source # |

Instance details

Defined in Cryptol.ModuleSystem.Renamer

type Rep RenamerWarning = D1 ('MetaData "RenamerWarning" "Cryptol.ModuleSystem.Renamer" "cryptol-2.8.0-11Z6ZaBuQbo1UTYpHYMeUg" 'False) (C1 ('MetaCons "SymbolShadowed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp))) :+: C1 ('MetaCons "UnusedName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NameDisp)))

renameVar :: PName -> RenameM Name Source #

renameType :: PName -> RenameM Name Source #

renameModule :: Module PName -> RenameM (NamingEnv, Module Name) Source #