Copyright | (c) 2013-2016 Galois Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module defines the scoping rules for value- and type-level names in Cryptol.
Synopsis
- tnamesNT :: Newtype name -> ([Located name], ())
- namesDs :: Ord name => [Decl name] -> ([Located name], Set name)
- namesD :: Ord name => Decl name -> ([Located name], Set name)
- allNamesD :: Ord name => Decl name -> [Located name]
- namesB :: Ord name => Bind name -> ([Located name], Set name)
- namesDef :: Ord name => BindDef name -> Set name
- namesE :: Ord name => Expr name -> Set name
- namesUF :: Ord name => UpdField name -> Set name
- namesPs :: [Pattern name] -> [Located name]
- namesP :: Pattern name -> [Located name]
- namesM :: Ord name => Match name -> ([Located name], Set name)
- namesArm :: Ord name => [Match name] -> ([Located name], Set name)
- boundLNames :: Ord name => [Located name] -> Set name -> Set name
- boundNames :: Ord name => [name] -> Set name -> Set name
- boundNamesSet :: Ord name => Set name -> Set name -> Set name
- tnamesDs :: Ord name => [Decl name] -> ([Located name], Set name)
- tnamesD :: Ord name => Decl name -> ([Located name], Set name)
- tnamesB :: Ord name => Bind name -> Set name
- tnamesDef :: Ord name => BindDef name -> Set name
- tnamesE :: Ord name => Expr name -> Set name
- tnamesUF :: Ord name => UpdField name -> Set name
- tnamesTI :: Ord name => TypeInst name -> Set name
- tnamesP :: Ord name => Pattern name -> Set name
- tnamesM :: Ord name => Match name -> Set name
- tnamesS :: Ord name => Schema name -> Set name
- tnamesC :: Ord name => Prop name -> Set name
- tnamesT :: Ord name => Type name -> Set name
Documentation
namesDs :: Ord name => [Decl name] -> ([Located name], Set name) Source #
The names defined and used by a group of mutually recursive declarations.
namesD :: Ord name => Decl name -> ([Located name], Set name) Source #
The names defined and used by a single declarations.
allNamesD :: Ord name => Decl name -> [Located name] Source #
The names defined and used by a single declarations in such a way
that they cannot be duplicated in a file. For example, it is fine
to use x
on the RHS of two bindings, but not on the LHS of two
type signatures.
namesB :: Ord name => Bind name -> ([Located name], Set name) Source #
The names defined and used by a single binding.
namesP :: Pattern name -> [Located name] Source #
The names defined by a pattern. These will always be unqualified names.
namesM :: Ord name => Match name -> ([Located name], Set name) Source #
The names defined and used by a match.
namesArm :: Ord name => [Match name] -> ([Located name], Set name) Source #
The names defined and used by an arm of alist comprehension.
boundLNames :: Ord name => [Located name] -> Set name -> Set name Source #
Remove some defined variables from a set of free variables.
boundNames :: Ord name => [name] -> Set name -> Set name Source #
Remove some defined variables from a set of free variables.
boundNamesSet :: Ord name => Set name -> Set name -> Set name Source #
Remove some defined variables from a set of free variables.
tnamesDs :: Ord name => [Decl name] -> ([Located name], Set name) Source #
The type names defined and used by a group of mutually recursive declarations.