packages feed

th-orphans 0.8.2 → 0.8.3

raw patch · 2 files changed

+14/−18 lines, 2 filesdep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

+ Language.Haskell.TH.Instances: instance Lift AnnTarget
+ Language.Haskell.TH.Instances: instance Lift Role
+ Language.Haskell.TH.Instances: instance Lift TySynEqn
+ Language.Haskell.TH.Instances: instance Ord AnnTarget
+ Language.Haskell.TH.Instances: instance Ord Role
+ Language.Haskell.TH.Instances: instance Ord TySynEqn

Files

src/Language/Haskell/TH/Instances.hs view
@@ -18,39 +18,29 @@ module Language.Haskell.TH.Instances () where  import GHC.Real (Ratio)-import GHC.Word (Word8) import Language.Haskell.TH import Language.Haskell.TH.Instances.Internal import Language.Haskell.TH.Lift (deriveLiftMany)-import Language.Haskell.TH.Ppr import Language.Haskell.TH.ReifyMany import Language.Haskell.TH.Syntax --- Orphan Show instances+-- Thanks to Richard Eisenberg, GHC 7.10 adds many of the instances+-- from this module.+#if !MIN_VERSION_template_haskell(2,10,0)+import GHC.Word (Word8)+import Language.Haskell.TH.Ppr  deriving instance Show Loc --- Orphan Eq instances- deriving instance Eq Loc deriving instance Eq Info-#if MIN_VERSION_template_haskell(2,5,0) && !(MIN_VERSION_template_haskell(2,7,0))-deriving instance Eq ClassInstance-#endif --- Orphan Ord instances- instance Ord FixityDirection where   (<=) InfixL _      = True   (<=) _      InfixR = True   (<=) InfixN InfixN = True   (<=) _      _      = False -$(reifyManyWithoutInstances ''Ord [''Info] (`notElem` [''Ratio]) >>=-  mapM deriveOrd)---- Orphan Ppr instances- -- TODO: make this better instance Ppr Loc where   ppr = showtextl . show@@ -58,11 +48,17 @@ instance Ppr Lit where   ppr l = ppr (LitE l) --- Orphan Lift instances (for when your TH generates TH!)- -- This follows the pattern of the Lift instances for Int / Integer. instance Lift Word8 where   lift w = [e| fromIntegral $(lift (fromIntegral w :: Int)) |]+#endif++#if MIN_VERSION_template_haskell(2,5,0) && !(MIN_VERSION_template_haskell(2,7,0))+deriving instance Eq ClassInstance+#endif++$(reifyManyWithoutInstances ''Ord [''Info] (`notElem` [''Ratio]) >>=+  mapM deriveOrd)  $(reifyManyWithoutInstances ''Lift [''Info] (const True) >>=   deriveLiftMany)
th-orphans.cabal view
@@ -1,5 +1,5 @@ name:               th-orphans-version:            0.8.2+version:            0.8.3 cabal-version:      >= 1.6 build-type:         Simple license:            BSD3