From 9d03c1425e6fd86a5547baa284b51c40f19808be Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Wed, 15 Jun 2022 23:01:55 -0600 Subject: [PATCH] Rewrite bootstrap to sorta support type signatures --- projects/shoggoth/src/python/ichor/state.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/shoggoth/src/python/ichor/state.py b/projects/shoggoth/src/python/ichor/state.py index 3dcc58b..e5699c6 100644 --- a/projects/shoggoth/src/python/ichor/state.py +++ b/projects/shoggoth/src/python/ichor/state.py @@ -208,6 +208,15 @@ class Module(t.NamedTuple): def __str__(self): b = [] + b.append("types:") + for sig, type in self.types.items(): + b.append(f" {sig!r}:") + b.append(f" name: {type.name}") + b.append(f" typeconstraints: {type.typeconstraints}") + b.append(f" arms:") + for arm in type.constructors: + b.append(f" - {arm}") + b.append("functions:") for sig, fun in self.functions.items(): b.append(f" {sig!r}:")