Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Dec 16, 2024
1 parent a104190 commit 0ce703d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 0 additions & 5 deletions guppylang/std/_internal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ def external_op(
def op(ty: ht.FunctionType, inst: Inst) -> ops.DataflowOp:
concrete_args = [make_concrete_arg(arg, inst, variable_remap) for arg in args]
return op_def.instantiate(concrete_args, ty)
return ops.ExtOp(
op_def,
ty,
concrete_args,
)

return op

Expand Down
6 changes: 3 additions & 3 deletions guppylang/tys/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def _array_to_hugr(args: Sequence[Argument]) -> ht.Type:
# See `ArrayGetitemCompiler` for details.
# Same also for classical arrays, see https://github.com/CQCL/guppylang/issues/629
elem_ty = ht.Option(ty_arg.ty.to_hugr())

array = hugr.std.collections.array.EXTENSION.get_type("array")
return array.instantiate([len_arg.to_hugr(), ht.TypeTypeArg(elem_ty)])
hugr_arg = len_arg.to_hugr()
assert isinstance(hugr_arg, ht.BoundedNatArg)
return hugr.std.collections.array.Array(elem_ty, hugr_arg)


def _sized_iter_to_hugr(args: Sequence[Argument]) -> ht.Type:
Expand Down

0 comments on commit 0ce703d

Please sign in to comment.