binrep-0.3.1: Encode precise binary representations directly in types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Binrep.Util

Synopsis

Documentation

tshow :: Show a => a -> Text Source #

posIntToNat :: Int -> Natural Source #

Convert some Int i where i >= 0 to a Natural.

This is intended for wrapping the output of length functions.

underflows if you call it with a negative Int :)

natVal'' :: forall a. KnownNat a => Natural Source #