cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2015 Galois, Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.Parser.Names

Description

This module defines the scoping rules for value- and type-level names in Cryptol.

Synopsis

- 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

tnamesNT :: Newtype -> ([Located QName], ()) Source

The names defined by a newtype.

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.

tsName :: TySyn -> Located QName Source

namesB :: Bind -> ([Located QName], Set QName) Source

The names defined and used by a single binding.

namesE :: Expr -> Set QName Source

The names used by an expression.

namesPs :: [Pattern] -> [Located QName] Source

The names defined by a group of patterns.

namesP :: Pattern -> [Located QName] Source

The names defined by a pattern. These will always be unqualified names.

namesM :: Match -> ([Located QName], Set QName) Source

The names defined and used by a match.

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.

tnamesD :: Decl -> ([Located QName], Set QName) Source

The type names defined and used by a single declaration.

tnamesB :: Bind -> Set QName Source

The type names used by a single binding.

tnamesE :: Expr -> Set QName Source

The type names used by an expression.

tnamesTI :: TypeInst -> Set QName Source

tnamesP :: Pattern -> Set QName Source

The type names used by a pattern.

tnamesM :: Match -> Set QName Source

The type names used by a match.

tnamesS :: Schema -> Set QName Source

The type names used by a type schema.

tnamesC :: Prop -> Set QName Source

The type names used by a prop.

tnamesT :: Type -> Set QName Source

Compute the type synonyms/type variables used by a type.