th-orphans 0.13.0 → 0.13.1
raw patch · 2 files changed
+10/−39 lines, 2 filesdep +th-lift-instancesdep ~base
Dependencies added: th-lift-instances
Dependency ranges changed: base
Files
- src/Language/Haskell/TH/Instances.hs +6/−35
- th-orphans.cabal +4/−4
src/Language/Haskell/TH/Instances.hs view
@@ -19,7 +19,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -- |--- Module : Language.Haskell.TH.Instances.Lift+-- Module : Language.Haskell.TH.Instances -- Copyright : (c) Matt Morrow 2008 -- License : BSD3 -- Maintainer : Michael Sloan <mgsloan at gmail>@@ -47,6 +47,10 @@ -- Note that the 'Ord' instances are not guaranteed to produce -- consistent results across template-haskell / GHC versions, as they -- have different data types, with different constructor orders.+--+-- This module also implicitly re-exports the instances defined in+-- "Instances.TH.Lift". This is mostly to ensure that there aren't+-- collisions of orphans between @th-orphans@ and @th-lift-instances@. module Language.Haskell.TH.Instances () where import Language.Haskell.TH@@ -60,6 +64,7 @@ import Control.Monad.State (StateT(StateT), runStateT) import Control.Monad.Writer (WriterT(WriterT), runWriterT) import qualified Control.Monad.Trans as MTL (lift)+import Instances.TH.Lift () -- Thanks to Richard Eisenberg, GHC 7.10 adds many of the instances -- from this module.@@ -109,40 +114,6 @@ #if !MIN_VERSION_template_haskell(2,10,0) instance Ppr Lit where ppr = pprLit noPrec---- This follows the pattern of the Lift instances for Int / Integer.-instance Lift Int8 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Int16 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Int32 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Int64 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Word where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Word8 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Word16 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Word32 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Word64 where- lift x = return (LitE (IntegerL (fromIntegral x)))--instance Lift Float where- lift x = return (LitE (RationalL (toRational x)))--instance Lift Double where- lift x = return (LitE (RationalL (toRational x))) deriving instance Eq Info
th-orphans.cabal view
@@ -1,5 +1,5 @@ name: th-orphans-version: 0.13.0+version: 0.13.1 cabal-version: >= 1.10 build-type: Simple license: BSD3@@ -10,7 +10,7 @@ maintainer: Michael Sloan <mgsloan at gmail> bug-reports: https://github.com/mgsloan/th-orphans/issues stability: experimental-tested-with: GHC == 7.0.1, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.3, GHC == 7.10.1+tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.3, GHC == 7.10.1 synopsis: Orphan instances for TH datatypes description: Orphan instances for TH datatypes. In particular, instances for Ord and Lift, as well as a few missing Show / Eq. These@@ -18,11 +18,12 @@ the version number started. library- build-depends: base >= 4.2 && < 5,+ build-depends: base >= 4.3 && < 5, template-haskell, -- https://github.com/mboes/th-lift/issues/14 th-lift >= 0.7.1, th-reify-many >= 0.1 && < 0.2,+ th-lift-instances, mtl -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.4@@ -37,7 +38,6 @@ ghc-options: -Wall exposed-modules: Language.Haskell.TH.Instances default-language: Haskell2010- test-suite test type: exitcode-stdio-1.0