| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cryptol.ModuleSystem.Binds
Synopsis
- class BindsNames a
- data TopDef
- data Mod a = Mod {}
- data ModKind
- modNested :: Mod a -> Set Name
- modBuilder :: ModBuilder a -> Supply -> ((a, [RenamerError]), Supply)
- topModuleDefs :: Module PName -> ModBuilder TopDef
- topDeclsDefs :: ModPath -> [TopDecl PName] -> ModBuilder (Mod ())
- newModParam :: FreshM m => ModPath -> Ident -> Range -> Name -> m Name
- newFunctorInst :: FreshM m => ModPath -> Name -> m Name
- data InModule a = InModule (Maybe ModPath) a
- ifaceToMod :: IfaceG name -> Mod ()
- ifaceSigToMod :: ModParamNames -> Mod ()
- modToMap :: ImpName Name -> Mod () -> Map (ImpName Name) (Mod ()) -> Map (ImpName Name) (Mod ())
- defsOf :: BindsNames a => a -> Supply -> (NamingEnv, Supply)
Documentation
class BindsNames a Source #
Things that define exported names.
Minimal complete definition
namingEnv
Instances
Things defined by a module
Constructors
| Mod | |
Fields
| |
Constructors
| AFunctor | |
| ASignature | |
| AModule |
Instances
modBuilder :: ModBuilder a -> Supply -> ((a, [RenamerError]), Supply) Source #
newModParam :: FreshM m => ModPath -> Ident -> Range -> Name -> m Name Source #
Given a name in a signature, make a name for the parameter corresponding to the signature.
newFunctorInst :: FreshM m => ModPath -> Name -> m Name Source #
Given a name in a functor, make a fresh name for the corresponding thing in the instantiation.
The ModPath should be the instantiation not the functor.
Do something in the context of a module.
If Nothing than we are working with a local declaration.
Otherwise we are at the top-level of the given module.
By wrapping types with this, we can pass the module path to methods that need the extra information.
Instances
| Foldable InModule Source # | |
Defined in Cryptol.ModuleSystem.Binds Methods fold :: Monoid m => InModule m -> m # foldMap :: Monoid m => (a -> m) -> InModule a -> m # foldMap' :: Monoid m => (a -> m) -> InModule a -> m # foldr :: (a -> b -> b) -> b -> InModule a -> b # foldr' :: (a -> b -> b) -> b -> InModule a -> b # foldl :: (b -> a -> b) -> b -> InModule a -> b # foldl' :: (b -> a -> b) -> b -> InModule a -> b # foldr1 :: (a -> a -> a) -> InModule a -> a # foldl1 :: (a -> a -> a) -> InModule a -> a # elem :: Eq a => a -> InModule a -> Bool # maximum :: Ord a => InModule a -> a # minimum :: Ord a => InModule a -> a # | |
| Traversable InModule Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| Functor InModule Source # | |
| Show a => Show (InModule a) Source # | |
| BindsNames (InModule (Bind PName)) Source # | Introduce the name |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (Decl PName)) Source # | The naming environment for a single declaration. |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (EnumDecl PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (NestedModule PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds Methods namingEnv :: InModule (NestedModule PName) -> BuildNamingEnv | |
| BindsNames (InModule (Newtype PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (ParameterFun PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds Methods namingEnv :: InModule (ParameterFun PName) -> BuildNamingEnv | |
| BindsNames (InModule (ParameterType PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds Methods namingEnv :: InModule (ParameterType PName) -> BuildNamingEnv | |
| BindsNames (InModule (PrimType PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (SigDecl PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
| BindsNames (InModule (TopDecl PName)) Source # | |
Defined in Cryptol.ModuleSystem.Binds | |
ifaceToMod :: IfaceG name -> Mod () Source #
Make a Mod from the public declarations in an interface.
This is used to handle imports.
ifaceSigToMod :: ModParamNames -> Mod () Source #