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]
- tsName :: TySyn name -> Located name
- psName :: PropSyn 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
- 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)
- boundNames :: Ord name => [Located name] -> Set name -> Set name
- namesT :: Ord name => Set name -> Type name -> Set name
- namesC :: Ord name => Set name -> Prop 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
- 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.
boundNames :: Ord name => [Located name] -> Set name -> Set name Source #
Remove some defined variables from a set of free variables.
namesT :: Ord name => Set name -> Type name -> Set name Source #
Given the set of type variables that are in scope, compute the type synonyms used by a type.
namesC :: Ord name => Set name -> Prop name -> Set name Source #
Given the set of type variables that are in scope, compute the type/constraint synonyms used by a prop.
tnamesDs :: Ord name => [Decl name] -> ([Located name], Set name) Source #
The type names defined and used by a group of mutually recursive declarations.