NAME
Devel::TypeCheck::Environment - class for managing the type environment in B::TypeCheck
SYNOPSIS
Objects of this type are instantiated with the <new
> method.
DESCRIPTION
The data structure is essentially a linked list from Mu at the head of the list to terminal or variable types at the end. Thus, most of the functions defined here support that by relaying the request to the subtype member (the next link in the linked list) instead of actually doing anything themselves.
- new
-
Create a new type environment.
- fresh
-
Create a new type variable in the context of the environment. This is so we can find unbound type variables later.
- fresh
-
Return a fully qualified incomplete Kappa instance
- freshEta
-
Return a fully qualified incomplete Eta instance
- freshNu
-
Return a fully qualified incomplete Nu instance
- freshRho
-
Return a fully qualified incomplete Rho instance
- freshUpsilon
-
Return a fuly qualified incomplete Upsilon instance
- freshZeta
-
Return a fully qualified incomplete Zeta instance
- genRho
-
Encapsulate something in a fully qualified reference
- genEta
-
Encapsulate something in a fully qualified glob
- genOmicron
-
Generate a fully quialified incomplete Omicron instance.
- genOmicron($subtype)
-
Generate a fully qualified Omicron instance with the given type as the homogeneous type.
- genOmicronTuple(@types)
-
Create a new tuple-type list given a list of types.
- genChi
-
Generate a fully qualified incomplete Chi instance
- genChi($subtype)
-
Generate a homogeneous Chi type with the given subtype as the homogeneous type.
- genZeta($params, $return)
-
Generate a Zeta type with the given params and return value.
- unify($t1, $t2)
-
Unify the two given types. If unsuccessful, this returns undef.
- find($elt)
-
Find the representative element of the set that
<$elt
> belongs to. For fully qualified types that end in a terminal, this is themselves.
AUTHOR
Gary Jackson, <bargle at umiacs.umd.edu>
BUGS
This version is specific to Perl 5.8.1. It may work with other versions that have the same opcode list and structure, but this is entirely untested. It definitely will not work if those parameters change.
Please report any bugs or feature requests to bug-devel-typecheck at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-TypeCheck. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
COPYRIGHT & LICENSE
Copyright 2005 Gary Jackson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.