type-level-show-0.1.0: Utilities for writing Show-like type families
Safe HaskellSafe-Inferred
LanguageGHC2021

TypeLevelShow.Utils

Synopsis

Documentation

type family ShowParen b p where ... Source #

Surround the given Symbol with parentheses when the Bool parameter is True.

Equations

ShowParen False p = p 
ShowParen True p = ConsSymbol '(' p `AppendSymbol` ")" 

type ShowParenIfGt n d p = ShowParen (OrderingGT (CmpNat d n)) p Source #

Surround the given Symbol with parentheses if the given precedence is greater than the given Natural.

Type-level relational operations are a pain. This may be easier to use.

type family OrderingGT (a :: Ordering) :: Bool where ... Source #

type ShowChar ch = ConsSymbol ch "" Source #

type (++) l r = AppendSymbol l r Source #

type (>) l r = OrderingGT (CmpNat l r) Source #