Skip to content

Commit

Permalink
Add docstrings for Environment and Substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmanuel1 committed Oct 20, 2024
1 parent 0dcf9d7 commit 8069270
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions concat/typecheck/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@


class Environment(Mapping[str, 'Type']):
"""A map from names in a typing context to the types of those names."""

def __init__(self, env: Optional[Mapping[str, Type]] = None) -> None:
self._env = env or {}
self._sub_cache = dict[int, Environment]()
Expand Down
2 changes: 2 additions & 0 deletions concat/typecheck/substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def apply_substitution(self, sub: 'Substitutions') -> _Result:


class Substitutions(Mapping['Variable', 'Type']):
"""Substitutions of type variables with types."""

__next_id = 0

def __init__(
Expand Down

0 comments on commit 8069270

Please sign in to comment.