From c803b35e11dbc5fb8cfe4a9344464b1efcb871d1 Mon Sep 17 00:00:00 2001 From: Mark Koch Date: Tue, 10 Dec 2024 09:17:02 +0000 Subject: [PATCH] Explain callable in docstring --- guppylang/decorator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guppylang/decorator.py b/guppylang/decorator.py index c978a878..5b7d6361 100644 --- a/guppylang/decorator.py +++ b/guppylang/decorator.py @@ -211,6 +211,10 @@ def type( Requires the static Hugr translation of the type. Additionally, the type can be marked as linear. All `@guppy` annotated functions on the class are turned into instance functions. + + For non-generic types, the Hugr representation can be passed as a static value. + For generic types, a callable may be passed that takes the type arguments of a + concrete instantiation. """ mod = module or self.get_module() mod._instance_func_buffer = {}