def ctor_nodes

bolt@1.27.0.0 · src/rules/laws/law.bend:72

import bolt@1.27.0.0/src/rules/laws/law.bend as Law
import Base
import bolt@1.27.0.0/src/rules/imports.bend as Imports

72# a type's constructors, each a node that leads nowhere, onto the others
73def ctor_nodes(cs: List<&2, String>, +pp: String, more: List<&2, Imports.Edge>) -> List<&2, Imports.Edge>:
74  match cs:
75    case Nil{}:
76      more
77    case Con{c, rest}:
78      Imports.Edge{key(pp, c), []} <> ctor_nodes(rest, pp, more)

Uses (4)

Used by (1)