cryptol-2.6.0: Cryptol: The Language of Cryptography

Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Cryptol.Parser.Names

Description

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

Synopsis

Documentation

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 #

psName :: PropSyn 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.

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.

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.