Module Expr Str Import alias identifier Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Raise NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print Str Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad NameLoad attr body Return Call SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Return Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Str keyword Str Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Print Print NameLoad Str Call NameLoad NameLoad Print Str Call NameLoad NameLoad decorator_list Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str Expr Call NameLoad Str
N/A N/A 
Parsing Copperhead types from strings.
 N/A coretypes T N/A pyast N/A re _TypeConversion N/A N/A pyast _astVisitor N/A N/A Convert Pythonified type expressions into internal form _Expression N/A N/A self tree N/A N/A N/A N/A N/A self visit N/A tree body N/A _Name N/A N/A self tree N/A N/A N/A id N/A tree id N/A N/A N/A id N/A T __dict__ N/A isinstance N/A N/A T __dict__ N/A id N/A T Monotype N/A N/A N/A N/A T __dict__ N/A id N/A N/A N/A tree id N/A _BinOp N/A N/A self tree N/A N/A N/A N/A N/A type N/A tree op N/A N/A pyast ast RShift N/A N/A SyntaxError N/A illegal type operator (%s) N/A tree op N/A L N/A N/A self visit N/A tree left N/A R N/A N/A self visit N/A tree right N/A N/A N/A T Fn L R N/A _Lambda N/A N/A self tree N/A N/A N/A args N/A N/A self visit N/A N/A tree args args N/A body N/A N/A self visit N/A tree body N/A BODY= N/A repr body N/A N/A N/A T Polytype args body N/A _Call N/A N/A self tree N/A N/A N/A conx N/A N/A self visit N/A tree func N/A args N/A N/A self visit N/A tree args N/A N/A N/A id N/A T __dict__ N/A isinstance N/A N/A T __dict__ N/A id N/A T Monotype N/A N/A N/A N/A N/A T __dict__ N/A id args N/A N/A N/A N/A T Monotype conx args N/A _Tuple N/A N/A self tree N/A N/A N/A N/A N/A T Tuple N/A N/A self visit N/A tree elts N/A _List N/A N/A self tree N/A N/A N/A N/A N/A T Seq N/A N/A self visit N/A tree elts N/A N/A _pythonify_type N/A N/A text N/A N/A N/A 
    Convert valid Copperhead type expression to valid Python expression.

    The Copperhead type language is very nearly syntactically valid
    Python.  To make parsing types relatively painless, we shamelessly
    convert type expressions into similar Python expressions, which we
    then feed into the Python parser.  Producing a syntactically valid
    Python expression involves the following conversions:

        - substitute 'lambda' for 'ForAll'
        - substitute '>>' for the '->' function operator
     N/A text N/A N/A re sub ForAll(?=\s) lambda text N/A text N/A N/A re sub -> >> text N/A N/A N/A text strip N/A N/A _convert_type N/A _TypeConversion type_from_text N/A N/A text N/A N/A N/A past N/A N/A N/A pyast ast parse N/A _pythonify_type text <type string> mode eval N/A N/A N/A T quantify_type N/A _convert_type past N/A N/A N/A __name__ __main__ N/A trial N/A N/A text N/A N/A N/A t N/A type_from_text text N/A N/A text == N/A str t N/A N/A repr t N/A N/A N/A trial ForAll a, b : a -> b N/A N/A trial Int -> Bool N/A N/A trial Point(Float, Float) N/A N/A trial (Int, Bool, Float) N/A N/A trial [(Int,Bool) -> Float]