checked-literals
Safe HaskellNone
LanguageGHC2021

CheckedLiterals.Class.TemplateHaskell

Description

Template Haskell helpers used to derive type-level bounds.

Synopsis

Documentation

maxBoundAsNat :: (Bounded a, Typeable a, Integral a) => Q Type Source #

Reify a type's maxBound as a type-level natural.

minBoundAsNat :: (Bounded a, Integral a, Typeable a) => Q Type Source #

Reify the absolute value of a type's non-positive minBound as a type-level natural.