hpython-0.1: Syntax tree and DSL for Python

Copyright(C) CSIRO 2017-2018
LicenseBSD3
MaintainerIsaac Elliott <isaace71295@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Language.Python.Validate.Scope

Contents

Description

 
Synopsis

Documentation

Main validation functions

runValidateScope :: ValidateScope ann e a -> Validation (NonEmpty e) a Source #

Miscellany

Extra types

data ScopeContext a Source #

Instances
Eq a => Eq (ScopeContext a) Source # 
Instance details

Defined in Language.Python.Validate.Scope

Show a => Show (ScopeContext a) Source # 
Instance details

Defined in Language.Python.Validate.Scope

scGlobalScope :: forall a. Lens' (ScopeContext a) (Map ByteString a) Source #

scLocalScope :: forall a. Lens' (ScopeContext a) (Map ByteString a) Source #

scImmediateScope :: forall a. Lens' (ScopeContext a) (Map ByteString a) Source #

runValidateScope' :: ScopeContext ann -> ValidateScope ann e a -> Validation (NonEmpty e) a Source #

data Binding Source #

Constructors

Clean 
Dirty 
Instances
Eq Binding Source # 
Instance details

Defined in Language.Python.Validate.Scope

Methods

(==) :: Binding -> Binding -> Bool #

(/=) :: Binding -> Binding -> Bool #

Ord Binding Source # 
Instance details

Defined in Language.Python.Validate.Scope

Show Binding Source # 
Instance details

Defined in Language.Python.Validate.Scope

Extra functions

extendScope :: Setter' (ScopeContext ann) (Map ByteString ann) -> [(ann, String)] -> ValidateScope ann e () Source #

locallyOver :: Lens' (ScopeContext ann) b -> (b -> b) -> ValidateScope ann e a -> ValidateScope ann e a Source #

locallyExtendOver :: Lens' (ScopeContext ann) (Map ByteString ann) -> [(ann, String)] -> ValidateScope ann e a -> ValidateScope ann e a Source #

Validation functions

validateArgScope :: AsScopeError e a => Arg v a -> ValidateScope a e (Arg (Nub (Scope ': v)) a) Source #

validateComprehensionScope :: AsScopeError e a => (ex v a -> ValidateScope a e (ex (Nub (Scope ': v)) a)) -> Comprehension ex v a -> ValidateScope a e (Comprehension ex (Nub (Scope ': v)) a) Source #