th-orphans 0.13.2 → 0.13.3
raw patch · 4 files changed
+47/−10 lines, 4 filesdep ~generic-derivingnew-uploader
Dependency ranges changed: generic-deriving
Files
- CHANGELOG.md +2/−0
- README.md +18/−0
- src/Language/Haskell/TH/Instances.hs +14/−4
- th-orphans.cabal +13/−6
+ CHANGELOG.md view
@@ -0,0 +1,2 @@+### 0.13.3 [2016.11.09]+* Backport `Generic NameFlavour` instance
+ README.md view
@@ -0,0 +1,18 @@+# `th-orphans`+[][Hackage: th-orphans]+[](http://packdeps.haskellers.com/reverse/th-orphans)+[][Haskell.org]+[][tl;dr Legal: BSD3]+[](https://travis-ci.org/mgsloan/th-orphans)++[Hackage: th-orphans]:+ http://hackage.haskell.org/package/th-orphans+ "th-orphans package on Hackage"+[Haskell.org]:+ http://www.haskell.org+ "The Haskell Programming Language"+[tl;dr Legal: BSD3]:+ https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29+ "BSD 3-Clause License (Revised)"++Orphan instances for TH datatypes
src/Language/Haskell/TH/Instances.hs view
@@ -1,7 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE CPP #-}+{-# LANGUAGE TypeFamilies #-} #if defined(__GLASGOW_HASKELL__) # define LANGUAGE_DeriveDataTypeable@@ -11,10 +12,12 @@ #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704 # define LANGUAGE_DeriveGeneric {-# LANGUAGE DeriveGeneric #-}-#else-{-# LANGUAGE TypeFamilies #-} #endif +#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE DataKinds #-}+#endif+ {-# OPTIONS_GHC -fno-warn-deprecations #-} {-# OPTIONS_GHC -fno-warn-orphans #-} @@ -98,7 +101,9 @@ # if __GLASGOW_HASKELL__ > 702 import GHC.Generics (Generic)-# else+# endif++# if __GLASGOW_HASKELL__ <= 702 || !(MIN_VERSION_template_haskell(2,10,0)) import qualified Generics.Deriving.TH as Generic (deriveAll) # endif #endif@@ -196,6 +201,11 @@ $(Generic.deriveAll ''Strict) $(Generic.deriveAll ''Type) # endif++-- Unconditionally use Template Haskell to derive this Generic instance, since+-- NameFlavour has fields with unboxed types (for which deriving Generic+-- support wasn't added to GHC until 8.0).+$(Generic.deriveAll ''NameFlavour) # if MIN_VERSION_template_haskell(2,3,0) instance Ppr Loc where
th-orphans.cabal view
@@ -1,5 +1,5 @@ name: th-orphans-version: 0.13.2+version: 0.13.3 cabal-version: >= 1.10 build-type: Simple license: BSD3@@ -10,12 +10,19 @@ maintainer: Michael Sloan <mgsloan at gmail> bug-reports: https://github.com/mgsloan/th-orphans/issues stability: experimental-tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.3, GHC == 7.10.3, GHC == 8.0.1+tested-with: GHC == 7.0.4+ , GHC == 7.2.2+ , GHC == 7.4.2+ , GHC == 7.6.3+ , GHC == 7.8.4+ , GHC == 7.10.3+ , GHC == 8.0.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 instances used to live in haskell-src-meta, and that's where the version number started.+extra-source-files: CHANGELOG.md, README.md library build-depends: base >= 4.3 && < 5,@@ -26,9 +33,9 @@ th-lift-instances, mtl - -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.4- if impl(ghc < 7.4)- build-depends: generic-deriving >= 1.8+ -- Use TH to derive Generics instances instead of DeriveGeneric, for < 7.10+ if impl(ghc < 7.10)+ build-depends: generic-deriving >= 1.9 -- Prior to GHC 7.6, GHC generics lived in ghc-prim if impl(ghc >= 7.2) && impl(ghc < 7.6)@@ -51,4 +58,4 @@ source-repository head type: git- location: git://github.com/mgsloan/th-orphans.git+ location: https://github.com/mgsloan/th-orphans