Copyright | (c) 2013-2015 Galois, Inc. |
---|---|
License | BSD3 |
Maintainer | cryptol@galois.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
This module defines the scoping rules for value- and type-level names in Cryptol.
- modExports :: Module -> ExportSpec
- tnamesNT :: Newtype -> ([Located QName], ())
- namesDs :: [Decl] -> ([Located QName], Set QName)
- namesD :: Decl -> ([Located QName], Set QName)
- allNamesD :: Decl -> [Located QName]
- tsName :: TySyn -> Located QName
- namesB :: Bind -> ([Located QName], Set QName)
- namesE :: Expr -> Set QName
- namesPs :: [Pattern] -> [Located QName]
- namesP :: Pattern -> [Located QName]
- namesM :: Match -> ([Located QName], Set QName)
- namesArm :: [Match] -> ([Located QName], Set QName)
- boundNames :: [Located QName] -> Set QName -> Set QName
- namesT :: Set QName -> Type -> Set QName
- tnamesDs :: [Decl] -> ([Located QName], Set QName)
- tnamesD :: Decl -> ([Located QName], Set QName)
- tnamesB :: Bind -> Set QName
- tnamesE :: Expr -> Set QName
- tnamesTI :: TypeInst -> Set QName
- tnamesP :: Pattern -> Set QName
- tnamesM :: Match -> Set QName
- tnamesS :: Schema -> Set QName
- tnamesC :: Prop -> Set QName
- tnamesT :: Type -> Set QName
Documentation
modExports :: Module -> ExportSpec Source
namesDs :: [Decl] -> ([Located QName], Set QName) Source
The names defined and used by a group of mutually recursive declarations.
namesD :: Decl -> ([Located QName], Set QName) Source
The names defined and used by a single declarations.
allNamesD :: Decl -> [Located QName] 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 :: Bind -> ([Located QName], Set QName) Source
The names defined and used by a single binding.
namesP :: Pattern -> [Located QName] Source
The names defined by a pattern. These will always be unqualified names.
namesArm :: [Match] -> ([Located QName], Set QName) Source
The names defined and used by an arm of alist comprehension.
boundNames :: [Located QName] -> Set QName -> Set QName Source
Remove some defined variables from a set of free variables.
namesT :: Set QName -> Type -> Set QName Source
Given the set of type variables that are in scope, compute the type synonyms used by a type.
tnamesDs :: [Decl] -> ([Located QName], Set QName) Source
The type names defined and used by a group of mutually recursive declarations.