type-digits-0.2: Type/Digits/Aux.hs
{-# LANGUAGE PolyKinds #-}
{- |
Module : Type.Digits.Aux
Copyright : (c) The University of Kansas 2011
License : BSD3
Maintainer : nicolas.frisby@gmail.com
Stability : experimental
Portability : see LANGUAGE pragmas (... GHC)
The parameters for the @type-digits@ package.
-}
module Type.Digits.Aux where
import Data.List (genericLength)
-- | The names of the digits.
digitStrings :: [String]
digitStrings = map ('T':) $ take 128
[ [c0, c1] | c0 <- ['0'..'9'] ++ ['A'..'F'], c1 <- ['0'..'9'] ++ ['A'..'F']]
--digitNames = map (\c -> ['T', c]) $ ['0'..'9'] ++ ['A'..'F']
-- | The number of digits.
radix :: Num i => i
radix = genericLength digitStrings
data Proxy a = Proxy