Module

Sigil.Svg.Layout.Siglet

Package
purescript-sigil
Repository
afcondon/purescript-sigil

Siglet layout: elided type signature showing arity, structure, and variable patterns.

Concrete type names become colored circles; type variable pills keep their colors. Forall and constraint annotations are rendered in the same zones as the full-size sigil: constraints above, body middle, forall below.

#layoutSiglet Source

layoutSiglet :: { ast :: RenderType, maxHeight :: Number, maxWidth :: Number } -> Maybe { layout :: LayoutNode, scaledHeight :: Number, scaledWidth :: Number }

Lay out a siglet (elided miniature type signature). TCon names render as small circles; TVar pills keep colors. Layout mirrors the full-size sigil: constraint pile above, body middle, forall row below. Returns Nothing if the type can't fit.