packages feed

type-digits 0.1.0.1 → 0.1.0.2

raw patch · 2 files changed

+4/−4 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Type.Digits: digit :: Num a => a -> Name
+ Type.Digits: digit :: (Show a, Eq a, Num a) => a -> Name
- Type.Digits: fixed :: (Bounded a, Integral a) => a -> [Name]
+ Type.Digits: fixed :: (Bounded a, Show a, Eq a, Integral a) => a -> [Name]
- Type.Digits: flexible :: Integral a => a -> [Name]
+ Type.Digits: flexible :: (Show a, Eq a, Integral a) => a -> [Name]

Files

Type/Digits.hs view
@@ -43,7 +43,7 @@  -- | Convert a number to the name of the corresponding digit -- error if the -- argument is out of range.-digit :: Num a => a -> Name+digit :: (Show a, Eq a, Num a) => a -> Name digit r = $(caseE [| r |] $ [   match (litP (IntegerL k))           (normalB $ liftNameG $ mkName n) []@@ -78,7 +78,7 @@  -- | Converts an @Integral@ to a type-level numeral using as many digits as it -- takes that particular number.-flexible :: Integral a => a -> [Name]+flexible :: (Show a, Eq a, Integral a) => a -> [Name] flexible   | 0 == radix = digit' -- NB guard against @/0@ -- e.g. number of elements in @a@ = radix   | otherwise = w where@@ -90,7 +90,7 @@  -- | Converts a @Bounded@ @Integral@ to a type-level numeral using exactly the -- number of digits it takes to represent each value of that type uniquely.-fixed :: forall a. (Bounded a, Integral a) => a -> [Name]+fixed :: forall a. (Bounded a, Show a, Eq a, Integral a) => a -> [Name] fixed = exactly (ceiling $ width [qProxy|a|]) . flexible  
type-digits.cabal view
@@ -1,5 +1,5 @@ Name:           type-digits-Version:        0.1.0.1+Version:        0.1.0.2 License:        BSD3 License-File:   LICENSE Author:         Nicolas Frisby <nicolas.frisby@gmail.com>