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

TypeLevelShow.Natural.Digit

Description

Unsafe Natural digit renderers.

These are used by TypeLevelShow.Natural, where modulo arithmetic guarantees that they are not used unsafely.

Synopsis

Documentation

type family ShowNatDigitHexLower (d :: Natural) :: Char where ... Source #

Return the associated lower-case Char for a Natural hexadecimal digit.

Unsafe. Must be called with 0-15.

data ShowNatDigitHexLowerSym d Source #

Instances

Instances details
type App ShowNatDigitHexLowerSym (d :: Natural) Source # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type family ShowNatDigitHexUpper (d :: Natural) :: Char where ... Source #

Return the associated upper-case Char for a Natural hexadecimal digit.

Unsafe. Must be called with 0-15.

data ShowNatDigitHexUpperSym d Source #

Instances

Instances details
type App ShowNatDigitHexUpperSym (d :: Natural) Source # 
Instance details

Defined in TypeLevelShow.Natural.Digit

type ENotDigitOfBase base = (Text "got non-" :<>: Text base) :<>: Text " digit" Source #

Type-level error message displayed when a digit renderer receives a digit not present in the base it handles.

Note that we can't show the digit, unless we use ShowType. Which type-level-show is about avoiding. Not really an issue, it should be clear in the type error.