guppylang-internals 0.23.0__py3-none-any.whl → 0.24.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. guppylang_internals/__init__.py +1 -1
  2. guppylang_internals/checker/core.py +8 -0
  3. guppylang_internals/checker/expr_checker.py +10 -20
  4. guppylang_internals/checker/func_checker.py +170 -21
  5. guppylang_internals/checker/stmt_checker.py +1 -1
  6. guppylang_internals/decorator.py +124 -58
  7. guppylang_internals/definition/const.py +2 -2
  8. guppylang_internals/definition/custom.py +1 -1
  9. guppylang_internals/definition/declaration.py +1 -1
  10. guppylang_internals/definition/extern.py +2 -2
  11. guppylang_internals/definition/function.py +1 -1
  12. guppylang_internals/definition/parameter.py +2 -2
  13. guppylang_internals/definition/pytket_circuits.py +1 -1
  14. guppylang_internals/definition/struct.py +10 -10
  15. guppylang_internals/definition/traced.py +1 -1
  16. guppylang_internals/definition/ty.py +6 -0
  17. guppylang_internals/definition/wasm.py +2 -2
  18. guppylang_internals/engine.py +13 -2
  19. guppylang_internals/nodes.py +0 -23
  20. guppylang_internals/std/_internal/compiler/tket_exts.py +3 -6
  21. guppylang_internals/std/_internal/compiler/wasm.py +37 -26
  22. guppylang_internals/tracing/function.py +13 -2
  23. guppylang_internals/tracing/unpacking.py +18 -12
  24. guppylang_internals/tys/builtin.py +30 -11
  25. guppylang_internals/tys/errors.py +6 -0
  26. guppylang_internals/tys/parsing.py +111 -125
  27. {guppylang_internals-0.23.0.dist-info → guppylang_internals-0.24.0.dist-info}/METADATA +3 -3
  28. {guppylang_internals-0.23.0.dist-info → guppylang_internals-0.24.0.dist-info}/RECORD +30 -30
  29. {guppylang_internals-0.23.0.dist-info → guppylang_internals-0.24.0.dist-info}/WHEEL +0 -0
  30. {guppylang_internals-0.23.0.dist-info → guppylang_internals-0.24.0.dist-info}/licenses/LICENCE +0 -0
@@ -1,6 +1,7 @@
1
1
  import ast
2
2
  import sys
3
3
  from collections.abc import Sequence
4
+ from dataclasses import dataclass, field
4
5
  from types import ModuleType
5
6
 
6
7
  from guppylang_internals.ast_util import (
@@ -17,7 +18,7 @@ from guppylang_internals.definition.ty import TypeDef
17
18
  from guppylang_internals.engine import ENGINE
18
19
  from guppylang_internals.error import GuppyError
19
20
  from guppylang_internals.tys.arg import Argument, ConstArg, TypeArg
20
- from guppylang_internals.tys.builtin import CallableTypeDef, bool_type
21
+ from guppylang_internals.tys.builtin import CallableTypeDef, SelfTypeDef, bool_type
21
22
  from guppylang_internals.tys.const import ConstValue
22
23
  from guppylang_internals.tys.errors import (
23
24
  CallableComptimeError,
@@ -34,6 +35,8 @@ from guppylang_internals.tys.errors import (
34
35
  LinearConstParamError,
35
36
  ModuleMemberNotFoundError,
36
37
  NonLinearOwnedError,
38
+ SelfTyNotInMethodError,
39
+ WrongNumberOfTypeArgsError,
37
40
  )
38
41
  from guppylang_internals.tys.param import ConstParam, Parameter, TypeParam
39
42
  from guppylang_internals.tys.subst import BoundVarFinder
@@ -48,46 +51,51 @@ from guppylang_internals.tys.ty import (
48
51
  )
49
52
 
50
53
 
51
- def arg_from_ast(
52
- node: AstNode,
53
- globals: Globals,
54
- param_var_mapping: dict[str, Parameter],
55
- allow_free_vars: bool = False,
56
- ) -> Argument:
54
+ @dataclass(frozen=True)
55
+ class TypeParsingCtx:
56
+ """Context for parsing types from AST nodes."""
57
+
58
+ #: The globals variable context
59
+ globals: Globals
60
+
61
+ #: The available type parameters indexed by name
62
+ param_var_mapping: dict[str, Parameter] = field(default_factory=dict)
63
+
64
+ #: Whether a previously unseen type parameters is allowed to be bound (i.e. is
65
+ #: allowed to be added to `param_var_mapping`
66
+ allow_free_vars: bool = False
67
+
68
+ #: When parsing types in the signature or body of a method, we also need access to
69
+ #: the type this method belongs to in order to resolve `Self` annotations.
70
+ self_ty: Type | None = None
71
+
72
+
73
+ def arg_from_ast(node: AstNode, ctx: TypeParsingCtx) -> Argument:
57
74
  """Turns an AST expression into an argument."""
58
75
  from guppylang_internals.checker.cfg_checker import VarNotDefinedError
59
76
 
60
77
  # A single (possibly qualified) identifier
61
- if defn := _try_parse_defn(node, globals):
62
- return _arg_from_instantiated_defn(
63
- defn, [], globals, node, param_var_mapping, allow_free_vars
64
- )
78
+ if defn := _try_parse_defn(node, ctx.globals):
79
+ return _arg_from_instantiated_defn(defn, [], node, ctx)
65
80
 
66
81
  # An identifier referring to a quantified variable
67
82
  if isinstance(node, ast.Name):
68
- if node.id in param_var_mapping:
69
- return param_var_mapping[node.id].to_bound()
83
+ if node.id in ctx.param_var_mapping:
84
+ return ctx.param_var_mapping[node.id].to_bound()
70
85
  raise GuppyError(VarNotDefinedError(node, node.id))
71
86
 
72
87
  # A parametrised type, e.g. `list[??]`
73
88
  if isinstance(node, ast.Subscript) and (
74
- defn := _try_parse_defn(node.value, globals)
89
+ defn := _try_parse_defn(node.value, ctx.globals)
75
90
  ):
76
91
  arg_nodes = (
77
92
  node.slice.elts if isinstance(node.slice, ast.Tuple) else [node.slice]
78
93
  )
79
- return _arg_from_instantiated_defn(
80
- defn, arg_nodes, globals, node, param_var_mapping, allow_free_vars
81
- )
94
+ return _arg_from_instantiated_defn(defn, arg_nodes, node, ctx)
82
95
 
83
96
  # We allow tuple types to be written as `(int, bool)`
84
97
  if isinstance(node, ast.Tuple):
85
- ty = TupleType(
86
- [
87
- type_from_ast(el, globals, param_var_mapping, allow_free_vars)
88
- for el in node.elts
89
- ]
90
- )
98
+ ty = TupleType([type_from_ast(el, ctx) for el in node.elts])
91
99
  return TypeArg(ty)
92
100
 
93
101
  # Literals
@@ -118,7 +126,7 @@ def arg_from_ast(
118
126
  if comptime_expr := is_comptime_expression(node):
119
127
  from guppylang_internals.checker.expr_checker import eval_comptime_expr
120
128
 
121
- v = eval_comptime_expr(comptime_expr, Context(globals, Locals({}), {}))
129
+ v = eval_comptime_expr(comptime_expr, Context(ctx.globals, Locals({}), {}))
122
130
  if isinstance(v, int):
123
131
  nat_ty = NumericType(NumericType.Kind.Nat)
124
132
  return ConstArg(ConstValue(nat_ty, v))
@@ -128,7 +136,7 @@ def arg_from_ast(
128
136
  # Finally, we also support delayed annotations in strings
129
137
  if isinstance(node, ast.Constant) and isinstance(node.value, str):
130
138
  node = _parse_delayed_annotation(node.value, node)
131
- return arg_from_ast(node, globals, param_var_mapping, allow_free_vars)
139
+ return arg_from_ast(node, ctx)
132
140
 
133
141
  raise GuppyError(InvalidTypeArgError(node))
134
142
 
@@ -165,28 +173,19 @@ def _try_parse_defn(node: AstNode, globals: Globals) -> Definition | None:
165
173
 
166
174
 
167
175
  def _arg_from_instantiated_defn(
168
- defn: Definition,
169
- arg_nodes: list[ast.expr],
170
- globals: Globals,
171
- node: AstNode,
172
- param_var_mapping: dict[str, Parameter],
173
- allow_free_vars: bool = False,
176
+ defn: Definition, arg_nodes: list[ast.expr], node: AstNode, ctx: TypeParsingCtx
174
177
  ) -> Argument:
175
178
  """Parses a globals definition with type args into an argument."""
176
179
  match defn:
177
180
  # Special case for the `Callable` type
178
181
  case CallableTypeDef():
179
- return TypeArg(
180
- _parse_callable_type(
181
- arg_nodes, node, globals, param_var_mapping, allow_free_vars
182
- )
183
- )
182
+ return TypeArg(_parse_callable_type(arg_nodes, node, ctx))
183
+ # Special case for the `Callable` type
184
+ case SelfTypeDef():
185
+ return TypeArg(_parse_self_type(arg_nodes, node, ctx))
184
186
  # Either a defined type (e.g. `int`, `bool`, ...)
185
187
  case TypeDef() as defn:
186
- args = [
187
- arg_from_ast(arg_node, globals, param_var_mapping, allow_free_vars)
188
- for arg_node in arg_nodes
189
- ]
188
+ args = [arg_from_ast(arg_node, ctx) for arg_node in arg_nodes]
190
189
  ty = defn.check_instantiate(args, node)
191
190
  return TypeArg(ty)
192
191
  # Or a parameter (e.g. `T`, `n`, ...)
@@ -194,12 +193,14 @@ def _arg_from_instantiated_defn(
194
193
  # We don't allow parametrised variables like `T[int]`
195
194
  if arg_nodes:
196
195
  raise GuppyError(HigherKindedTypeVarError(node, defn))
197
- if defn.name not in param_var_mapping:
198
- if allow_free_vars:
199
- param_var_mapping[defn.name] = defn.to_param(len(param_var_mapping))
196
+ if defn.name not in ctx.param_var_mapping:
197
+ if ctx.allow_free_vars:
198
+ ctx.param_var_mapping[defn.name] = defn.to_param(
199
+ len(ctx.param_var_mapping)
200
+ )
200
201
  else:
201
202
  raise GuppyError(FreeTypeVarError(node, defn))
202
- return param_var_mapping[defn.name].to_bound()
203
+ return ctx.param_var_mapping[defn.name].to_bound()
203
204
  case defn:
204
205
  err = ExpectedError(node, "a type", got=f"{defn.description} `{defn.name}`")
205
206
  raise GuppyError(err)
@@ -224,11 +225,7 @@ def _parse_delayed_annotation(ast_str: str, node: ast.Constant) -> ast.expr:
224
225
 
225
226
 
226
227
  def _parse_callable_type(
227
- args: list[ast.expr],
228
- loc: AstNode,
229
- globals: Globals,
230
- param_var_mapping: dict[str, Parameter],
231
- allow_free_vars: bool = False,
228
+ args: list[ast.expr], loc: AstNode, ctx: TypeParsingCtx
232
229
  ) -> FunctionType:
233
230
  """Helper function to parse a `Callable[[<arguments>], <return type>]` type."""
234
231
  err = InvalidCallableTypeError(loc)
@@ -237,59 +234,63 @@ def _parse_callable_type(
237
234
  [inputs, output] = args
238
235
  if not isinstance(inputs, ast.List):
239
236
  raise GuppyError(err)
240
- inouts, output = parse_function_io_types(
241
- inputs.elts, output, None, loc, globals, param_var_mapping, allow_free_vars
242
- )
243
- return FunctionType(inouts, output)
244
-
245
-
246
- def parse_function_io_types(
247
- input_nodes: list[ast.expr],
248
- output_node: ast.expr,
249
- input_names: list[str] | None,
250
- loc: AstNode,
251
- globals: Globals,
252
- param_var_mapping: dict[str, Parameter],
253
- allow_free_vars: bool = False,
254
- ) -> tuple[list[FuncInput], Type]:
255
- """Parses the inputs and output types of a function type.
256
-
257
- This function takes care of parsing annotations and any related checks.
258
-
259
- Returns the parsed input and output types.
237
+ inputs = [parse_function_arg_annotation(inp, None, ctx) for inp in inputs.elts]
238
+ output = type_from_ast(output, ctx)
239
+ return FunctionType(inputs, output)
240
+
241
+
242
+ def _parse_self_type(args: list[ast.expr], loc: AstNode, ctx: TypeParsingCtx) -> Type:
243
+ """Helper function to parse a `Self` type.
244
+
245
+ Returns the actual type `Self` refers to or emits a user error if we're not inside
246
+ a method.
260
247
  """
261
- inputs = []
262
- for i, inp in enumerate(input_nodes):
263
- ty, flags = type_with_flags_from_ast(
264
- inp, globals, param_var_mapping, allow_free_vars
248
+ if ctx.self_ty is None:
249
+ raise GuppyError(SelfTyNotInMethodError(loc))
250
+
251
+ # We don't allow specifying generic arguments of `Self`. This matches the behaviour
252
+ # of Python.
253
+ if args:
254
+ raise GuppyError(WrongNumberOfTypeArgsError(loc, 0, len(args), "Self"))
255
+ return ctx.self_ty
256
+
257
+
258
+ def parse_function_arg_annotation(
259
+ annotation: ast.expr, name: str | None, ctx: TypeParsingCtx
260
+ ) -> FuncInput:
261
+ """Parses an annotation in the input of a function type."""
262
+ ty, flags = type_with_flags_from_ast(annotation, ctx)
263
+ return check_function_arg(ty, flags, annotation, name, ctx)
264
+
265
+
266
+ def check_function_arg(
267
+ ty: Type, flags: InputFlags, loc: AstNode, name: str | None, ctx: TypeParsingCtx
268
+ ) -> FuncInput:
269
+ """Given a function input type and its user-provided flags, checks if the flags
270
+ are valid and inserts implicit flags."""
271
+ if InputFlags.Owned in flags and ty.copyable:
272
+ raise GuppyError(NonLinearOwnedError(loc, ty))
273
+ if not ty.copyable and InputFlags.Owned not in flags:
274
+ flags |= InputFlags.Inout
275
+ if InputFlags.Comptime in flags:
276
+ if name is None:
277
+ raise GuppyError(CallableComptimeError(loc))
278
+
279
+ # Make sure we're not shadowing a type variable with the same name that was
280
+ # already used on the left. E.g
281
+ #
282
+ # n = guppy.type_var("n")
283
+ # def foo(xs: array[int, n], n: nat @comptime)
284
+ #
285
+ # TODO: In principle we could lift this restriction by tracking multiple
286
+ # params referring to the same name in `param_var_mapping`, but not sure if
287
+ # this would be worth it...
288
+ if name in ctx.param_var_mapping:
289
+ raise GuppyError(ComptimeArgShadowError(loc, name))
290
+ ctx.param_var_mapping[name] = ConstParam(
291
+ len(ctx.param_var_mapping), name, ty, from_comptime_arg=True
265
292
  )
266
- if InputFlags.Owned in flags and ty.copyable:
267
- raise GuppyError(NonLinearOwnedError(loc, ty))
268
- if not ty.copyable and InputFlags.Owned not in flags:
269
- flags |= InputFlags.Inout
270
- if InputFlags.Comptime in flags:
271
- if input_names is None:
272
- raise GuppyError(CallableComptimeError(inp))
273
- name = input_names[i]
274
-
275
- # Make sure we're not shadowing a type variable with the same name that was
276
- # already used on the left. E.g
277
- #
278
- # n = guppy.type_var("n")
279
- # def foo(xs: array[int, n], n: nat @comptime)
280
- #
281
- # TODO: In principle we could lift this restriction by tracking multiple
282
- # params referring to the same name in `param_var_mapping`, but not sure if
283
- # this would be worth it...
284
- if name in param_var_mapping:
285
- raise GuppyError(ComptimeArgShadowError(inp, name))
286
- param_var_mapping[name] = ConstParam(
287
- len(param_var_mapping), name, ty, from_comptime_arg=True
288
- )
289
-
290
- inputs.append(FuncInput(ty, flags))
291
- output = type_from_ast(output_node, globals, param_var_mapping, allow_free_vars)
292
- return inputs, output
293
+ return FuncInput(ty, flags)
293
294
 
294
295
 
295
296
  if sys.version_info >= (3, 12):
@@ -330,7 +331,8 @@ if sys.version_info >= (3, 12):
330
331
  # parameters, so we pass an empty dict as the `param_var_mapping`.
331
332
  # TODO: In the future we might want to allow stuff like
332
333
  # `def foo[T, XS: array[T, 42]]` and so on
333
- ty = type_from_ast(bound, globals, {}, allow_free_vars=False)
334
+ ctx = TypeParsingCtx(globals, param_var_mapping={})
335
+ ty = type_from_ast(bound, ctx)
334
336
  if not ty.copyable or not ty.droppable:
335
337
  raise GuppyError(LinearConstParamError(bound, ty))
336
338
 
@@ -348,15 +350,10 @@ _type_param = TypeParam(0, "T", False, False)
348
350
 
349
351
 
350
352
  def type_with_flags_from_ast(
351
- node: AstNode,
352
- globals: Globals,
353
- param_var_mapping: dict[str, Parameter],
354
- allow_free_vars: bool = False,
353
+ node: AstNode, ctx: TypeParsingCtx
355
354
  ) -> tuple[Type, InputFlags]:
356
355
  if isinstance(node, ast.BinOp) and isinstance(node.op, ast.MatMult):
357
- ty, flags = type_with_flags_from_ast(
358
- node.left, globals, param_var_mapping, allow_free_vars
359
- )
356
+ ty, flags = type_with_flags_from_ast(node.left, ctx)
360
357
  match node.right:
361
358
  case ast.Name(id="owned"):
362
359
  if ty.copyable:
@@ -382,35 +379,24 @@ def type_with_flags_from_ast(
382
379
  # We also need to handle the case that this could be a delayed string annotation
383
380
  elif isinstance(node, ast.Constant) and isinstance(node.value, str):
384
381
  node = _parse_delayed_annotation(node.value, node)
385
- return type_with_flags_from_ast(
386
- node, globals, param_var_mapping, allow_free_vars
387
- )
382
+ return type_with_flags_from_ast(node, ctx)
388
383
  else:
389
384
  # Parse an argument and check that it's valid for a `TypeParam`
390
- arg = arg_from_ast(node, globals, param_var_mapping, allow_free_vars)
385
+ arg = arg_from_ast(node, ctx)
391
386
  tyarg = _type_param.check_arg(arg, node)
392
387
  return tyarg.ty, InputFlags.NoFlags
393
388
 
394
389
 
395
- def type_from_ast(
396
- node: AstNode,
397
- globals: Globals,
398
- param_var_mapping: dict[str, Parameter],
399
- allow_free_vars: bool = False,
400
- ) -> Type:
390
+ def type_from_ast(node: AstNode, ctx: TypeParsingCtx) -> Type:
401
391
  """Turns an AST expression into a Guppy type."""
402
- ty, flags = type_with_flags_from_ast(
403
- node, globals, param_var_mapping, allow_free_vars
404
- )
392
+ ty, flags = type_with_flags_from_ast(node, ctx)
405
393
  if flags != InputFlags.NoFlags:
406
394
  assert InputFlags.Inout not in flags # Users shouldn't be able to set this
407
395
  raise GuppyError(FlagNotAllowedError(node))
408
396
  return ty
409
397
 
410
398
 
411
- def type_row_from_ast(
412
- node: ast.expr, globals: "Globals", allow_free_vars: bool = False
413
- ) -> Sequence[Type]:
399
+ def type_row_from_ast(node: ast.expr, ctx: TypeParsingCtx) -> Sequence[Type]:
414
400
  """Turns an AST expression into a Guppy type row.
415
401
 
416
402
  This is needed to interpret the return type annotation of functions.
@@ -418,7 +404,7 @@ def type_row_from_ast(
418
404
  # The return type `-> None` is represented in the ast as `ast.Constant(value=None)`
419
405
  if isinstance(node, ast.Constant) and node.value is None:
420
406
  return []
421
- ty = type_from_ast(node, globals, {}, allow_free_vars)
407
+ ty = type_from_ast(node, ctx)
422
408
  if isinstance(ty, TupleType):
423
409
  return ty.element_types
424
410
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: guppylang-internals
3
- Version: 0.23.0
3
+ Version: 0.24.0
4
4
  Summary: Compiler internals for `guppylang` package.
5
5
  Author-email: Mark Koch <mark.koch@quantinuum.com>, TKET development team <tket-support@quantinuum.com>
6
6
  Maintainer-email: Mark Koch <mark.koch@quantinuum.com>, TKET development team <tket-support@quantinuum.com>
@@ -220,7 +220,7 @@ Classifier: Programming Language :: Python :: 3.14
220
220
  Classifier: Topic :: Software Development :: Compilers
221
221
  Requires-Python: <4,>=3.10
222
222
  Requires-Dist: hugr~=0.13.1
223
- Requires-Dist: tket-exts~=0.10.0
223
+ Requires-Dist: tket-exts~=0.11.0
224
224
  Requires-Dist: typing-extensions<5,>=4.9.0
225
225
  Provides-Extra: pytket
226
226
  Requires-Dist: pytket>=1.34; extra == 'pytket'
@@ -228,7 +228,7 @@ Description-Content-Type: text/markdown
228
228
 
229
229
  # guppylang-internals
230
230
 
231
- This packages contains the internals of the Guppy compiler.
231
+ This packages contains the internals of the Guppy compiler.
232
232
 
233
233
  See `guppylang` for the package providing the user-facing language frontend.
234
234
 
@@ -1,13 +1,13 @@
1
- guppylang_internals/__init__.py,sha256=lZyhpAJ-bru-ZxPcVJYGsj9BfAP5TrumwEBb5RV9Czk,130
1
+ guppylang_internals/__init__.py,sha256=DGSTdGFDWX6LAry7XIDSqKcMw7qI9NIEAI_aS2gLKcc,130
2
2
  guppylang_internals/ast_util.py,sha256=Y_7MoilGpahv7tJ1xN5nVGIELZlhk-5h_9AbI3qixZg,11839
3
- guppylang_internals/decorator.py,sha256=-A3Xml0uvS4DJGd138ZjdP9aiK_orHCaJpF8IR0JSu8,8742
3
+ guppylang_internals/decorator.py,sha256=AWfPMMXzq5YC8nfB6DOwnRsrWKztuUK19n8APllgQ2w,10928
4
4
  guppylang_internals/diagnostic.py,sha256=VCpIhyVD8KPtk0GDYMa8XH0lKVsRbsWNu_ucE2jQT2I,18395
5
5
  guppylang_internals/dummy_decorator.py,sha256=LXTXrdcrr55YzerX3qrHS23q6S9pVdpUAvhprWzKH6E,2330
6
- guppylang_internals/engine.py,sha256=KM3iY2gz5RrtEB44AWuz8P16Gk-ItDuUpsG9cDMtFyg,10251
6
+ guppylang_internals/engine.py,sha256=enloUzh4-2Ac0L7UCIzsMvsjzHvWIy8MvDoT2xhPdKk,10625
7
7
  guppylang_internals/error.py,sha256=fjHsbglnH9GtcsLF4sSry7FTjrLoiyQ-L1JS3uGirx0,3393
8
8
  guppylang_internals/experimental.py,sha256=ad3Ti6ncUdQA6MiXRyj45GvzlSx3Ww7PhrEpnrb79kI,2937
9
9
  guppylang_internals/ipython_inspect.py,sha256=rY2DpSpSBrRk0IZmuoz7jh35kGZHQnHLAQQFdb_-WnI,931
10
- guppylang_internals/nodes.py,sha256=y9nlIiZIj1pfOEbBBveMkwuqmCfnfoqEBpGsGeMwQPc,10100
10
+ guppylang_internals/nodes.py,sha256=Wvf12iU6rhx7RgqbbtcGPkiJwtQjgt6NMkYzmzZPAHc,9580
11
11
  guppylang_internals/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  guppylang_internals/span.py,sha256=8rWzAAipWunhhyCp44qdUAPmOfAXkEMvicK0PYc3tTg,4986
13
13
  guppylang_internals/cfg/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -17,11 +17,11 @@ guppylang_internals/cfg/builder.py,sha256=9WExlNvZkO0NcTgr4zATxk7Oys8Uas2me1leeD
17
17
  guppylang_internals/cfg/cfg.py,sha256=G6wTHtyRYcBN7FIwyIQnt3akVjM-Rl37PEXAaujplMg,4355
18
18
  guppylang_internals/checker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  guppylang_internals/checker/cfg_checker.py,sha256=SH_89mAQLNBVesERm9alJJ2h0xzQFzCA5uKBD2VfJms,13472
20
- guppylang_internals/checker/core.py,sha256=5c2X8AHwSBGQdk2eMiplhQ5lnl78bxQA2mJm3MFUty0,17675
21
- guppylang_internals/checker/expr_checker.py,sha256=4XVeJFcoorNDkbGXG3JAk8Rtq9-AP4f_BkqlgBVTun4,58698
22
- guppylang_internals/checker/func_checker.py,sha256=zpYJ4vj6Xe0cmhF43ISV7rnRqGqel6jZQQfY8oFv9yU,10090
20
+ guppylang_internals/checker/core.py,sha256=PI4vLkv_u799Ae0JpKsN4JIV8Toxf16DRyRg1V4Q2lM,18006
21
+ guppylang_internals/checker/expr_checker.py,sha256=AuSWTLu3rBGIq8Uw-Vj-nS0aLDI4VUuXqIEiP2PoNWg,58199
22
+ guppylang_internals/checker/func_checker.py,sha256=rp7_W79f5wqkB4qv5qrP3hGYJXpW3L1mpeeSGtxYJAI,15906
23
23
  guppylang_internals/checker/linearity_checker.py,sha256=cHvJSqFKWpkLqO7uAwz7OBmxtAi8ZN_K7afMrspkXy4,34719
24
- guppylang_internals/checker/stmt_checker.py,sha256=l-SNeep5pHvIr4ji4WwZBMwu56t_q2qA3SNbUAU4WoM,18848
24
+ guppylang_internals/checker/stmt_checker.py,sha256=J1LT6rae8a_p2pbdHKJQTZdeDkZak017icotWWyBQHA,18827
25
25
  guppylang_internals/checker/errors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  guppylang_internals/checker/errors/comptime_errors.py,sha256=ee42lnVjXbjqirjp6vYaRvbKKexeNV08px1Kqu9eXn8,3436
27
27
  guppylang_internals/checker/errors/generic.py,sha256=485uhGANlWiKZrYpD0Fjh3lCqnL3QwqROzGZhwsiSug,1183
@@ -38,19 +38,19 @@ guppylang_internals/compiler/qtm_platform_extension.py,sha256=47DEQpj8HBSa-_TImW
38
38
  guppylang_internals/compiler/stmt_compiler.py,sha256=Td1-xgrYtQMstpy_qh90baCvwYXRk95M7SOJ7qyXO2s,9201
39
39
  guppylang_internals/definition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  guppylang_internals/definition/common.py,sha256=Me7gpCTzOqDv7eRv6Wo5ynsMYy6MEDpeX9uY2acYRDI,6927
41
- guppylang_internals/definition/const.py,sha256=DF7B_o3JyQwetVlXpxNDyTgEb7UWH1JlEbIeA-oUy-U,2255
42
- guppylang_internals/definition/custom.py,sha256=4qpaSFXwG1BkV-3LnOso8Z_nGGlNVC_jJYh6H6ma_Pg,17920
43
- guppylang_internals/definition/declaration.py,sha256=kObHupYRMAnJv69rJApwnsYUPzOtbw9KIzug0ilMNiw,5885
44
- guppylang_internals/definition/extern.py,sha256=0nk3a8oIqdh0-1n6_5aw7pNfExZwih3EY80h1oO7vz8,2850
45
- guppylang_internals/definition/function.py,sha256=hOH-AD-jURjqIRjbYcKRAeFpxVvlPTI6N5pZT9khF2Y,10960
41
+ guppylang_internals/definition/const.py,sha256=71QVX3xqSaC0u4bsYHPbR_0Csz1Es-P7HHGxbTZXfNI,2283
42
+ guppylang_internals/definition/custom.py,sha256=eozLnrEFvOknYuJZnnar4jSV3V09V5qbCC7rzhHjWt0,17929
43
+ guppylang_internals/definition/declaration.py,sha256=xZOyWgivJou8smL4wpIXWXuAzHwtcBfhTJ6LNrS8T-c,5894
44
+ guppylang_internals/definition/extern.py,sha256=hEajRYaapKIfX9J7scnusQHc1e_bCxB4oUVWZ-D4c8o,2878
45
+ guppylang_internals/definition/function.py,sha256=oz-4dk5gyc0sYIPbAmTgpbxl5dokjb8oPX1wM22z2EI,10969
46
46
  guppylang_internals/definition/overloaded.py,sha256=UQ64waMp48gEVDCqEzuJFrRoNJ9saUIRUAynF3T-Gz8,5132
47
- guppylang_internals/definition/parameter.py,sha256=a5lKQejBuVYBd5Y6wSZLTO6wALB7Nn4kMwqrsCvYMvA,2699
48
- guppylang_internals/definition/pytket_circuits.py,sha256=32oALaByJk0kpBLu3iJ1I1HpYxGgETf3IMqAyJb6qPo,18194
49
- guppylang_internals/definition/struct.py,sha256=zyprHpLTNqNAGfMvLQb-v7dTEtnrbcoRdzerB0akjzQ,15303
50
- guppylang_internals/definition/traced.py,sha256=_hK_x5vhNlctw_fBxcwbsSh0H-Od1fqkLqFPIKDugxM,5583
51
- guppylang_internals/definition/ty.py,sha256=WIqkwW04Jqpizn1pEVrLSL5TA-1SgYOlsnIV2TN8x10,1741
47
+ guppylang_internals/definition/parameter.py,sha256=dKAWQ6hQlqatXgcryiK27igxBsY5GrcB_9SucU2v4TE,2727
48
+ guppylang_internals/definition/pytket_circuits.py,sha256=6zne7lrmP-vAYJfUtamRqsXcZEXwFzfFYxZelAeJQcs,18203
49
+ guppylang_internals/definition/struct.py,sha256=zLAT75WgL6tzqxuRvscYCRnilngWOfOlfEnXEN-3jVo,15334
50
+ guppylang_internals/definition/traced.py,sha256=hMHnrLKdbMvmmzmcJRvOCR-WiPHJ3x5ji0am436HNTQ,5592
51
+ guppylang_internals/definition/ty.py,sha256=Aw7kgDOGv3crRoESUlAeR_2ovX8kV0qhGhuHlGOLf1s,2081
52
52
  guppylang_internals/definition/value.py,sha256=tgkp-brIAauGXMqe68Fnwvz_bfdThdwJ_rzsGMbw95w,3452
53
- guppylang_internals/definition/wasm.py,sha256=RnaqySNRLsk-q3f8-NKIythnlLHF9TeZ2ivIHXq_JKo,1987
53
+ guppylang_internals/definition/wasm.py,sha256=Op8IpiKRZkNX-90UBp7uu3nCxx2VkbKKxHz-DZQuWs0,1987
54
54
  guppylang_internals/std/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  guppylang_internals/std/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  guppylang_internals/std/_internal/checker.py,sha256=26GgGr2bBu6CAeWiYh-ggCz5rjOuL_ZJgbq1KwpZE4k,21731
@@ -70,29 +70,29 @@ guppylang_internals/std/_internal/compiler/prelude.py,sha256=fwWWNDNUggFrtIG1JeQ
70
70
  guppylang_internals/std/_internal/compiler/qsystem.py,sha256=dKSpvpxF7WRfWuDj0u7zShEhTL6mkAr9pQNyYVoa8vM,1940
71
71
  guppylang_internals/std/_internal/compiler/quantum.py,sha256=gXuB1vpRl8ipgwwEYPCgoMPiqPUJ908Msl09jJFdWxg,3930
72
72
  guppylang_internals/std/_internal/compiler/tket_bool.py,sha256=ceO9BBF3HhjNAkc4dObJBH13Kpn08-pSaksjl3yoOa4,1207
73
- guppylang_internals/std/_internal/compiler/tket_exts.py,sha256=Q6RhXQU8Vm9HelpYyswdgYJUIr8scDuLlHFTZ9dkVhI,1468
74
- guppylang_internals/std/_internal/compiler/wasm.py,sha256=c5WUTLS3NVswuzYzROoUsOOeh_dkW_RnUuOeMI5kxLU,5220
73
+ guppylang_internals/std/_internal/compiler/tket_exts.py,sha256=NteaIlCn4K0LoXwUCCLh39w7hoPdmpmdQ39_7P4ezKU,1381
74
+ guppylang_internals/std/_internal/compiler/wasm.py,sha256=1G8EzrnN3Yv12hIdv2XOg4Hq-QlvRYl7-4QbZYLYyM4,5727
75
75
  guppylang_internals/tracing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  guppylang_internals/tracing/builtins_mock.py,sha256=iKgrs626DVhdN7nJroKBLstWGwkr7PzJI4CrgqkMyTA,2963
77
77
  guppylang_internals/tracing/frozenlist.py,sha256=sINk-PZTw4dNThF5GK9AZxAeX5ap-g_hbqxZ79GtLAc,1823
78
- guppylang_internals/tracing/function.py,sha256=sH7BHQrx0Hdq_4aYWwxXwN3ANfnTvhT-7re7mirelOQ,7233
78
+ guppylang_internals/tracing/function.py,sha256=K2rEey0awOxwfljGk4uezRmXode7rgOKQY1VN94wOIo,7901
79
79
  guppylang_internals/tracing/object.py,sha256=WLALkgqCMXOmPOydb4Rkg7OxRweSke1f9YU_JohMaiE,19748
80
80
  guppylang_internals/tracing/state.py,sha256=J-fG0dZh9IeB6hpLfyp5IwqS2TW0Zr8XloMmuIHWS6Q,2083
81
- guppylang_internals/tracing/unpacking.py,sha256=JODTlg2LQ60UsRC37GNquzKvoFjR59P67FNSyMmIQcc,8770
81
+ guppylang_internals/tracing/unpacking.py,sha256=i3qFl__DIdm8uuRfHNdisSLLxZ6hSe_8SFUTs8Bhv5Q,9075
82
82
  guppylang_internals/tracing/util.py,sha256=zzVUeY7Ax4v_ZQh7QmckYaOWsg7BRZg6-oX4VWmytDU,3054
83
83
  guppylang_internals/tys/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
84
  guppylang_internals/tys/arg.py,sha256=4mtfDHtybV8d6cpK-B_Sdc6FTIsVd2udJYvOGtepa3A,3892
85
- guppylang_internals/tys/builtin.py,sha256=9WvxN3cBLKpfusU6d339gEtsTH8lXTW-4eCghWvG86k,11892
85
+ guppylang_internals/tys/builtin.py,sha256=iLhqxXM4v66erI22-k__Xc_86ANw9_d7acUyrLq-yMM,12763
86
86
  guppylang_internals/tys/common.py,sha256=kCJDzSquUdztV5zEINE0Lxigawux9te0lmzd0Oa70J0,3575
87
87
  guppylang_internals/tys/const.py,sha256=MiD46lybIqkiXEh_7ekipYanIe7MahDwY8c-PWY0s3c,3718
88
- guppylang_internals/tys/errors.py,sha256=B42S1j9exGtx_zmNVr5bgEA6ZJ1pW7mIsKvb-KGX7oU,5323
88
+ guppylang_internals/tys/errors.py,sha256=Llc1CXDqkXW6Hi-cpMJaTLKweSN2a2E4sHpXapC0VRA,5514
89
89
  guppylang_internals/tys/param.py,sha256=9GsfJ4Hjt4FkjgC4lFirUjE7oVkqTD-ACV0LJWstswI,9340
90
- guppylang_internals/tys/parsing.py,sha256=n1baSNb9SCZStuyTsSVuiOvkCoPPj__oH-MVqHY9AnI,16797
90
+ guppylang_internals/tys/parsing.py,sha256=A7zwXvXLFze8wtxI0Am1VqG98ddgGw7vqevo_29qCoQ,16863
91
91
  guppylang_internals/tys/printing.py,sha256=F60SZsvqDRNMQSbgNDfBDt2pYQH2ueaZo7ObmUa2fLE,5961
92
92
  guppylang_internals/tys/subst.py,sha256=REFbw2POB6wGw-NBOZ4K4T6gE5FZe6nQ_VjcUmhOxCs,3430
93
93
  guppylang_internals/tys/ty.py,sha256=ejvC8fg-BpaCf0Cs9sZIBjaKW2yQwapOG_KbThCkoKg,30973
94
94
  guppylang_internals/tys/var.py,sha256=zACXv2IvGrqjDryC6lMyZpNnDb3SBRM2SlTOyq6WJdo,1173
95
- guppylang_internals-0.23.0.dist-info/METADATA,sha256=NiaZE5IBZRTN_YMXkTwevI9wz-Jnaw1FiCc9Xv2Jsx0,14809
96
- guppylang_internals-0.23.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
- guppylang_internals-0.23.0.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
98
- guppylang_internals-0.23.0.dist-info/RECORD,,
95
+ guppylang_internals-0.24.0.dist-info/METADATA,sha256=FN7OX-_6P1uO-j0DFz0aTf4Y56RV4pOAuwNQvNRSzFc,14808
96
+ guppylang_internals-0.24.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
97
+ guppylang_internals-0.24.0.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
98
+ guppylang_internals-0.24.0.dist-info/RECORD,,