-- | Render the multi-param positional mapping carried by a 'SuperclassEdge'.
--
+-- Multi-arg labels use @{arg1} {arg2}@ rather than @(arg1, arg2)@ —
+-- the tuple shape was confusingly close to Haskell's @(a, b)@ tuple
+-- type, but the args are positional, not packed.
+--
-- Examples:
--
-- * Single-arg: subclass @C a@, superclass @D a@ ⇒ label @"a"@.
--- * Multi-param identity: subclass @C a b@, super @D a b@ ⇒ @"(a, b)"@.
+-- * Multi-param identity: subclass @C a b@, super @D a b@ ⇒ @"{a} {b}"@.
-- * Multi-param projection: subclass @C a b@, super @D b@ ⇒ @"b"@.
-- * Family-mediated: subclass @C a@, super @D (F a)@ ⇒ @"(F a)"@.
edgeLabel :: [TyVarInfo] -> SuperclassEdge -> Text
edgeLabel subTvs se = case seArgs se of
[arg] -> renderTypeArgShort subTvs arg
- args -> "(" <> T.intercalate ", " (map (renderTypeArgShort subTvs) args) <> ")"
+ args -> T.intercalate " "
+ (map (\a -> "{" <> renderTypeArgShort subTvs a <> "}") args)
renderTypeArgShort :: [TyVarInfo] -> TypeArg -> Text
renderTypeArgShort subTvs ta = case ta of