packages feed

th-compat 0.1 → 0.1.1

raw patch · 4 files changed

+16/−8 lines, 4 files

Files

CHANGELOG.md view
@@ -1,2 +1,5 @@+### 0.1.1 [2021.02.07]+* Mark `Language.Haskell.TH.Syntax.Compat` as `Trustworthy`.+ ## 0.1 [2020.09.29] * Initial release
README.md view
@@ -3,7 +3,7 @@ [![Hackage Dependencies](https://img.shields.io/hackage-deps/v/th-compat.svg)](http://packdeps.haskellers.com/reverse/th-compat) [![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)][Haskell.org] [![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)][tl;dr Legal: BSD3]-[![Build](https://img.shields.io/travis/haskell-compat/th-compat.svg)](https://travis-ci.org/haskell-compat/th-compat)+[![Build Status](https://github.com/haskell-compat/th-compat/workflows/Haskell-CI/badge.svg)](https://github.com/haskell-compat/th-compat/actions?query=workflow%3AHaskell-CI)  [Hackage: th-compat]:   http://hackage.haskell.org/package/th-compat
src/Language/Haskell/TH/Syntax/Compat.hs view
@@ -8,6 +8,10 @@ {-# LANGUAGE RankNTypes #-} {-# LANGUAGE UndecidableInstances #-} +#if __GLASGOW_HASKELL__ >= 702+{-# LANGUAGE Trustworthy #-}+#endif+ #if __GLASGOW_HASKELL__ >= 706 {-# LANGUAGE PolyKinds #-} #endif@@ -472,8 +476,8 @@ -- myCode = 'toCode' [|| 42 ||] -- -- -- 'fromCode' will ensure that the input 'Code' is suitable for splicing--- (i.e., it will return a 'Code' or a 'TExp' depending on the--- @template-haskell@ version in use).+-- -- (i.e., it will return a 'Code' or a 'TExp' depending on the+-- -- @template-haskell@ version in use). -- fortyTwo :: Int -- fortyTwo = $$('fromCode' myCode) -- @@@ -599,6 +603,7 @@  -- | Modify the ambient monad used during code generation. For example, you -- can use `hoistCode` to handle a state effect:+-- -- @ --  handleState :: Code (StateT Int Q) a -> Code Q a --  handleState = hoistCode (flip runState 0)@@ -720,9 +725,9 @@ -- @ -- instance 'Syntax.Lift' Text where --   'Syntax.lift' = appE (varE 'pack) . stringE . unpack--- #if MIN_VERSION_template_haskell(2,17,0)+-- #if MIN\_VERSION\_template\_haskell(2,17,0) --   'Syntax.liftTyped' = 'unsafeCodeCoerce' . 'Syntax.lift'--- #elif MIN_VERSION_template_haskell(2,16,0)+-- #elif MIN\_VERSION\_template\_haskell(2,16,0) --   'Syntax.liftTyped' = 'Syntax.unsafeTExpCoerce' . 'Syntax.lift' -- #endif -- @@@ -737,7 +742,7 @@ -- @ -- instance 'Syntax.Lift' Text where --   'Syntax.lift' = appE (varE 'pack) . stringE . unpack--- #if MIN_VERSION_template_haskell(2,16,0)+-- #if MIN\_VERSION\_template\_haskell(2,16,0) --   'Syntax.liftTyped' = 'liftTypedFromUntypedSplice' -- #endif -- @@@ -779,7 +784,7 @@ -- @ -- instance 'Syntax.Lift' Int# where --   'Syntax.lift' x = litE (intPrimL (fromIntegral (I# x)))--- #if MIN_VERSION_template_haskell(2,16,0)+-- #if MIN\_VERSION\_template\_haskell(2,16,0) --   'Syntax.liftTyped' x = 'unsafeSpliceCoerce' ('Syntax.lift' x) -- #endif -- @
th-compat.cabal view
@@ -1,6 +1,6 @@ cabal-version:       >=1.10 name:                th-compat-version:             0.1+version:             0.1.1 synopsis:            Backward- (and forward-)compatible Quote and Code types description:         This package defines a "Language.Haskell.TH.Syntax.Compat"                      module, which backports the @Quote@ and @Code@ types to