repr 0.4.1.1 → 0.4.1.2
raw patch · 3 files changed
+20/−18 lines, 3 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Text.Repr: instance Bits α => Bits (Repr α)
- Text.Repr: instance Floating α => Floating (Repr α)
- Text.Repr: instance Fractional α => Fractional (Repr α)
- Text.Repr: instance Integral α => Integral (Repr α)
- Text.Repr: instance Num α => Num (Repr α)
- Text.Repr: instance Real α => Real (Repr α)
- Text.Repr: instance RealFloat α => RealFloat (Repr α)
- Text.Repr: instance RealFrac α => RealFrac (Repr α)
+ Text.Repr: instance (Bits α, Show α) => Bits (Repr α)
+ Text.Repr: instance (Floating α, Show α) => Floating (Repr α)
+ Text.Repr: instance (Fractional α, Show α) => Fractional (Repr α)
+ Text.Repr: instance (Integral α, Show α) => Integral (Repr α)
+ Text.Repr: instance (Num α, Show α) => Num (Repr α)
+ Text.Repr: instance (Real α, Show α) => Real (Repr α)
+ Text.Repr: instance (RealFloat α, Show α) => RealFloat (Repr α)
+ Text.Repr: instance (RealFrac α, Show α) => RealFrac (Repr α)
Files
- Prelude/Repr.hs +5/−4
- Text/Repr.hs +12/−11
- repr.cabal +3/−3
Prelude/Repr.hs view
@@ -1,5 +1,9 @@-{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude, OverloadedStrings #-}+{-# LANGUAGE CPP, UnicodeSyntax, NoImplicitPrelude, OverloadedStrings #-} +#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#endif+ -------------------------------------------------------------------------------- -- | -- Module : Prelude.Repr@@ -75,6 +79,3 @@ -- | Lifts @Prelude.'Prelude.realToFrac'@ into @'Repr's@ realToFrac ∷ (Real α, Fractional β) ⇒ Repr α → Repr β realToFrac = app Prelude.realToFrac "realToFrac"----- The End ---------------------------------------------------------------------
Text/Repr.hs view
@@ -6,6 +6,10 @@ , DeriveDataTypeable #-} +#if __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Safe #-}+#endif+ -------------------------------------------------------------------------------- -- | -- Module : Text.Repr@@ -252,7 +256,7 @@ instance IsString α ⇒ IsString (Repr α) where fromString = liftA2 constant fromString fromShow -instance Num α ⇒ Num (Repr α) where+instance (Num α, Show α) ⇒ Num (Repr α) where PURE(fromInteger) INFX(L, 6, +) INFX(L, 6, -)@@ -261,10 +265,10 @@ APP(abs) APP(signum) -instance Real α ⇒ Real (Repr α) where+instance (Real α, Show α) ⇒ Real (Repr α) where TO(toRational) -instance Integral α ⇒ Integral (Repr α) where+instance (Integral α, Show α) ⇒ Integral (Repr α) where APP2(quot) APP2(rem) APP2(div)@@ -273,12 +277,12 @@ TUP(divMod) TO(toInteger) -instance Fractional α ⇒ Fractional (Repr α) where+instance (Fractional α, Show α) ⇒ Fractional (Repr α) where INFX(L, 7, /) APP(recip) PURE(fromRational) -instance Floating α ⇒ Floating (Repr α) where+instance (Floating α, Show α) ⇒ Floating (Repr α) where CONSTANT(pi) INFX(R, 8, **) APP2(logBase)@@ -298,7 +302,7 @@ APP(atanh) APP(acosh) -instance RealFrac α ⇒ RealFrac (Repr α) where+instance (RealFrac α, Show α) ⇒ RealFrac (Repr α) where TO(truncate) TO(round) TO(ceiling)@@ -308,7 +312,7 @@ let (n, f) = properFraction x in (n, repr f $ "snd" `apply` parens ("properFraction" <+> args [rx])) -instance RealFloat α ⇒ RealFloat (Repr α) where+instance (RealFloat α, Show α) ⇒ RealFloat (Repr α) where TO(floatRadix) TO(floatDigits) TO(floatRange)@@ -371,7 +375,7 @@ unzipReprs ∷ [Repr α] → ([α], [Renderer]) unzipReprs = unzip ∘ map (extract &&& renderer) -instance Bits α ⇒ Bits (Repr α) where+instance (Bits α, Show α) ⇒ Bits (Repr α) where INFX(L, 7, .&.) INFX(L, 5, .|.) APP2(xor)@@ -536,6 +540,3 @@ in ( repr q $ "fst" `apply` s , repr r $ "snd" `apply` s )----- The End ---------------------------------------------------------------------
repr.cabal view
@@ -1,5 +1,5 @@ name: repr-version: 0.4.1.1+version: 0.4.1.2 cabal-version: >= 1.6 build-type: Simple stability: experimental@@ -8,7 +8,7 @@ copyright: (c) 2009-2011 Bas van Dijk license: BSD3 license-file: LICENSE-homepage: https://github.com/basvandijk/repr/+homepage: https://github.com/basvandijk/repr bug-reports: https://github.com/basvandijk/repr/issues category: Numeric, Text synopsis: Render overloaded expressions to their textual representation.@@ -30,7 +30,7 @@ Location: git://github.com/basvandijk/repr.git library- build-depends: base >= 3 && < 4.5+ build-depends: base >= 3 && < 4.6 , base-unicode-symbols >= 0.1.1 && < 0.3 , random >= 1.0 && < 1.1 , string-combinators >= 0.6 && < 0.7