From 4d984fd19a22a481b42ac714696f5d592f96f1c5 Mon Sep 17 00:00:00 2001 From: Craig Roy Date: Fri, 13 Mar 2026 17:20:56 +0000 Subject: [PATCH 1/2] Fix model call example --- hugr-model/tests/fixtures/model-call.edn | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hugr-model/tests/fixtures/model-call.edn b/hugr-model/tests/fixtures/model-call.edn index 8fa25feaf6..0f392baf74 100644 --- a/hugr-model/tests/fixtures/model-call.edn +++ b/hugr-model/tests/fixtures/model-call.edn @@ -4,24 +4,24 @@ (declare-func public example.callee - (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]) + (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)]) (meta (compat.meta_json "title" "\"Callee\"")) (meta (compat.meta_json "description" "\"This is a function declaration.\""))) (define-func public example.caller - (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]) + (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)]) (meta (compat.meta_json "title" "\"Caller\"")) (meta (compat.meta_json "description" "\"This defines a function that calls the function which we declared earlier.\"")) (dfg [%3] [%4] - (signature (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])) + (signature (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)])) ((core.call _ _ example.callee) [%3] [%4] - (signature (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]))))) + (signature (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)]))))) (define-func public example.load - (core.fn [] [(core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])]) + (core.fn [] [(core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)])]) (dfg [] [%5] - (signature (core.fn [] [(core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])])) + (signature (core.fn [] [(core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)])])) ((core.load_const _ example.caller) [] [%5]))) From 5fd5315501fe1f6baa0b03bcdfbb9dc9948f5c7a Mon Sep 17 00:00:00 2001 From: Craig Roy Date: Fri, 13 Mar 2026 17:40:37 +0000 Subject: [PATCH 2/2] Update snapshot --- .../snapshots/model__roundtrip_call.snap | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/hugr-core/tests/snapshots/model__roundtrip_call.snap b/hugr-core/tests/snapshots/model__roundtrip_call.snap index 75c3632c38..c5832a0ba7 100644 --- a/hugr-core/tests/snapshots/model__roundtrip_call.snap +++ b/hugr-core/tests/snapshots/model__roundtrip_call.snap @@ -19,40 +19,49 @@ expression: ast (declare-func public example.callee - (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]) + (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)]) (meta (compat.meta_json "description" "\"This is a function declaration.\"")) (meta (compat.meta_json "title" "\"Callee\""))) (define-func public example.caller - (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]) + (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)]) (meta (compat.meta_json "description" "\"This defines a function that calls the function which we declared earlier.\"")) (meta (compat.meta_json "title" "\"Caller\"")) (dfg [%0] [%1] - (signature (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])) + (signature + (core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)])) ((core.call - [arithmetic.int.types.int] - [arithmetic.int.types.int] + [(arithmetic.int.types.int 5)] + [(arithmetic.int.types.int 5)] example.callee) [%0] [%1] (signature - (core.fn [arithmetic.int.types.int] [arithmetic.int.types.int]))))) + (core.fn + [(arithmetic.int.types.int 5)] + [(arithmetic.int.types.int 5)]))))) (define-func public example.load - (core.fn [] [(core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])]) + (core.fn + [] + [(core.fn [(arithmetic.int.types.int 5)] [(arithmetic.int.types.int 5)])]) (dfg [] [%0] (signature (core.fn [] - [(core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])])) + [(core.fn + [(arithmetic.int.types.int 5)] + [(arithmetic.int.types.int 5)])])) ((core.load_const example.caller) [] [%0] (signature (core.fn [] - [(core.fn [arithmetic.int.types.int] [arithmetic.int.types.int])]))))) + [(core.fn + [(arithmetic.int.types.int 5)] + [(arithmetic.int.types.int 5)])])))))