cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Cryptol.Parser.Names

Description

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

Synopsis

Documentation

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.

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.

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.