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

Description

 
Synopsis

Documentation

validateModuleAll Source #

Arguments

:: (AsIndentationError e a, AsSyntaxError e a, AsScopeError e a) 
=> Module '[] a

Module to validate

-> Validation (NonEmpty e) (Module '[Scope, Syntax, Indentation] a) 

validateStatementAll Source #

Arguments

:: (AsIndentationError e a, AsSyntaxError e a, AsScopeError e a) 
=> Statement '[] a

Statement to validate

-> Validation (NonEmpty e) (Statement '[Scope, Syntax, Indentation] a) 

validateExprAll Source #

Arguments

:: (AsIndentationError e a, AsSyntaxError e a, AsScopeError e a) 
=> Expr '[] a

SimpleStatement to validate

-> Validation (NonEmpty e) (Expr '[Scope, Syntax, Indentation] a) 

validateAll Source #

Arguments

:: (AsIndentationError e a, AsSyntaxError e a, AsScopeError e a) 
=> (s '[] a -> ValidateIndentation e (s '[Indentation] a))

Indentation validator

-> (s '[Indentation] a -> ValidateSyntax e (s '[Syntax, Indentation] a))

Syntax validator

-> (s '[Syntax, Indentation] a -> ValidateScope a e (s '[Scope, Syntax, Indentation] a))

Scope validator

-> s '[] a 
-> Validation (NonEmpty e) (s '[Scope, Syntax, Indentation] a) 

Validate a datatype for indentation, syntax, and scope correctness

e.g.

validateModuleAll =
  validateAll
    validateModuleIndentation
    validateModuleSyntax
    validateModuleScope