th-orphans 0.13.9 → 0.13.10
raw patch · 5 files changed
+12/−16 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +3/−0
- src/Language/Haskell/TH/Instances.hs +4/−12
- test/Spec.hs +1/−1
- test/TestUtil.hs +1/−1
- th-orphans.cabal +3/−2
CHANGELOG.md view
@@ -1,3 +1,6 @@+### 0.13.10 [2020.04.13]+* Implement `liftTyped` in the `Lift Bytes` instance.+ ### 0.13.9 [2019.09.28] * Implement `qReifyType` (introduced in `template-haskell-2.16.0.0`) for the `Quasi` instances defined in `th-orphans`.
src/Language/Haskell/TH/Instances.hs view
@@ -63,7 +63,6 @@ import Language.Haskell.TH.ReifyMany import Language.Haskell.TH.Syntax -import Data.Monoid (Monoid) import Control.Monad.Reader (ReaderT(ReaderT), runReaderT) import Control.Monad.RWS (RWST(RWST), runRWST) import Control.Monad.State (StateT(StateT), runStateT)@@ -81,9 +80,6 @@ -- Thanks to Richard Eisenberg, GHC 7.10 adds many of the instances -- from this module. #if !MIN_VERSION_template_haskell(2,10,0)-import Data.Int (Int8, Int16, Int32, Int64)-import Data.Word (Word8, Word16, Word32, Word64)- import Language.Haskell.TH.Ppr # if MIN_VERSION_template_haskell(2,3,0) import Language.Haskell.TH.PprLib@@ -101,7 +97,7 @@ # endif # if !(MIN_VERSION_base(4,8,0))-import Data.Word (Word)+import Data.Monoid (Monoid) # endif # if MIN_VERSION_template_haskell(2,3,0) && defined(LANGUAGE_DeriveDataTypeable)@@ -121,12 +117,7 @@ import qualified Control.Monad.Fail as Fail #endif --- TODO: Once GHC 8.10 is released, this should be updated to use the--- proper template haskell version. Other related usages of this #if--- should be replaced as well (and do not have a TODO like this).------ #if MIN_VERSION_template_haskell(2,16,0)-#if __GLASGOW_HASKELL__ >= 809+#if MIN_VERSION_template_haskell(2,16,0) import GHC.Ptr (Ptr(Ptr)) import GHC.ForeignPtr (newForeignPtr_) import System.IO.Unsafe (unsafePerformIO)@@ -417,7 +408,7 @@ deriving instance Typeable Quasi #endif -#if __GLASGOW_HASKELL__ >= 809+#if MIN_VERSION_template_haskell(2,16,0) instance Lift Bytes where lift bytes = [| Bytes@@ -428,6 +419,7 @@ |] where size = bytesSize bytes+ liftTyped = unsafeTExpCoerce . lift #endif $(reifyManyWithoutInstances ''Lift [''Info, ''Loc] (const True) >>=
test/Spec.hs view
@@ -25,7 +25,7 @@ it "Compares types correctly" $ compare (AppT (ConT ''Maybe) (ConT ''Int)) (AppT (ConT ''Maybe) (ConT ''Char)) `shouldBe` GT-#if __GLASGOW_HASKELL__ >= 809+#if MIN_VERSION_template_haskell(2,16,0) it "Lifts bytes" $ do let addr = $(do let result = $(do
test/TestUtil.hs view
@@ -4,7 +4,7 @@ module TestUtil where -#if __GLASGOW_HASKELL__ >= 809+#if MIN_VERSION_template_haskell(2,16,0) import Language.Haskell.TH.Syntax import qualified Data.ByteString as BS
th-orphans.cabal view
@@ -1,5 +1,5 @@ name: th-orphans-version: 0.13.9+version: 0.13.10 cabal-version: >= 1.10 build-type: Simple license: BSD3@@ -21,6 +21,7 @@ , GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.1+ , GHC == 8.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@@ -30,7 +31,7 @@ library build-depends: base >= 4.3 && < 5,- template-haskell < 2.16,+ template-haskell < 2.17, -- https://github.com/mboes/th-lift/issues/14 th-lift >= 0.7.1, th-reify-many >= 0.1 && < 0.2,