cryptol-2.4.0: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2016 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 :: Ord name => Module name -> ExportSpec name
- 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
- 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
- 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

modExports :: Ord name => Module name -> ExportSpec name Source #

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

The names defined by a newtype.

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.

tsName :: TySyn name -> Located name Source #

namesB :: Ord name => Bind name -> ([Located name], Set name) Source #

The names defined and used by a single binding.

namesDef :: Ord name => BindDef name -> Set name Source #

namesE :: Ord name => Expr name -> Set name Source #

The names used by an expression.

namesPs :: [Pattern name] -> [Located name] Source #

The names defined by a group of patterns.

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.

tnamesDs :: Ord name => [Decl name] -> ([Located name], Set name) Source #

The type names defined and used by a group of mutually recursive declarations.

tnamesD :: Ord name => Decl name -> ([Located name], Set name) Source #

The type names defined and used by a single declaration.

tnamesB :: Ord name => Bind name -> Set name Source #

The type names used by a single binding.

tnamesDef :: Ord name => BindDef name -> Set name Source #

tnamesE :: Ord name => Expr name -> Set name Source #

The type names used by an expression.

tnamesTI :: Ord name => TypeInst name -> Set name Source #

tnamesP :: Ord name => Pattern name -> Set name Source #

The type names used by a pattern.

tnamesM :: Ord name => Match name -> Set name Source #

The type names used by a match.

tnamesS :: Ord name => Schema name -> Set name Source #

The type names used by a type schema.

tnamesC :: Ord name => Prop name -> Set name Source #

The type names used by a prop.

tnamesT :: Ord name => Type name -> Set name Source #

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