cryptol-2.2.1: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Cryptol.ModuleSystem.NamingEnv

Description

 

Synopsis

Documentation

class HasQName a where Source

Methods

qname :: a -> QName Source

origin :: a -> NameOrigin Source

data NamingEnv Source

Constructors

NamingEnv 

Fields

neExprs :: Map QName [EName]

Expr renaming environment

neTypes :: Map QName [TName]

Type renaming environment

singletonT :: QName -> TName -> NamingEnv Source

Singleton type renaming environment.

singletonE :: QName -> EName -> NamingEnv Source

Singleton expression renaming environment.

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 -> NamingEnv Source

Instances

BindsNames TParam

Generate the naming environment for a type parameter.

BindsNames Schema

Generate a type renaming environment from the parameters that are bound by this schema.

BindsNames Pattern

Generate an expression renaming environment from a pattern. This ignores type parameters that can be bound by the pattern.

BindsNames Match

Translate names bound by the patterns of a match into a renaming environment.

BindsNames Bind 
BindsNames Decl

The naming environment for a single declaration, unqualified. This is meanat to be used for things like where clauses.

BindsNames Module

The naming environment for a single module. This is the mapping from unqualified internal names to fully qualified names.

BindsNames IfaceDecls

Translate a set of declarations from an interface into a naming environment.

BindsNames Iface

Produce a naming environment from an interface file, that contains a mapping only from unqualified names to qualified ones.

BindsNames NamingEnv 
BindsNames a => BindsNames [a] 
BindsNames a => BindsNames (Maybe a)