hpython-0.1.0.1: Python language tools

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

Language.Python.Validate.Scope

Contents

Description

 
Synopsis

Documentation

Main validation functions

data Scope #

validateExprScope :: AsScopeError e a => Expr v a -> ValidateScope a e (Expr (Nub (Scope ': v)) a) #

Miscellany

Extra types

data ScopeContext a #

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

Defined in Language.Python.Validate.Scope

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

Defined in Language.Python.Validate.Scope

data Binding #

Constructors

Clean 
Dirty 
Instances
Eq Binding # 
Instance details

Defined in Language.Python.Validate.Scope

Methods

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

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

Ord Binding # 
Instance details

Defined in Language.Python.Validate.Scope

Show Binding # 
Instance details

Defined in Language.Python.Validate.Scope

Extra functions

inScope :: MonadState (ScopeContext ann) m => String -> m (Maybe (Binding, ann)) #

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

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

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

Validation functions

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

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) #