Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions System/OsPath/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,34 @@ import System.OsString.Windows as PS
import Data.Bifunctor ( bimap )
import qualified System.OsPath.Windows.Internal as C
import GHC.IO.Encoding.UTF16 ( mkUTF16le )
import Language.Haskell.TH.Quote
#if __GLASGOW_HASKELL__ >= 914
import Language.Haskell.TH.Lift
( Lift(..), lift )
import Language.Haskell.TH.QuasiQuoter
( QuasiQuoter (..) )
#else
import Language.Haskell.TH.Syntax
( Lift (..), lift )
( Lift(..), lift )
import Language.Haskell.TH.Quote
( QuasiQuoter (..) )
#endif
import GHC.IO.Encoding.Failure ( CodingFailureMode(..) )
import Control.Monad ( when )

#elif defined(POSIX)
import GHC.IO.Encoding.Failure ( CodingFailureMode(..) )
import Control.Monad ( when )
import Language.Haskell.TH.Quote
#if __GLASGOW_HASKELL__ >= 914
import Language.Haskell.TH.Lift
( Lift(..), lift )
import Language.Haskell.TH.QuasiQuoter
( QuasiQuoter (..) )
#else
import Language.Haskell.TH.Syntax
( Lift (..), lift )
( Lift(..), lift )
import Language.Haskell.TH.Quote
( QuasiQuoter (..) )
#endif

import GHC.IO.Encoding.UTF8 ( mkUTF8 )
import System.OsPath.Types
Expand Down
11 changes: 9 additions & 2 deletions System/OsPath/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ import Control.Monad.Catch
( MonadThrow )
import Data.ByteString
( ByteString )
import Language.Haskell.TH.Quote
#if __GLASGOW_HASKELL__ >= 914
import Language.Haskell.TH.Lift
( Lift(..), lift )
import Language.Haskell.TH.QuasiQuoter
( QuasiQuoter (..) )
#else
import Language.Haskell.TH.Syntax
( Lift (..), lift )
( Lift(..), lift )
import Language.Haskell.TH.Quote
( QuasiQuoter (..) )
#endif
import GHC.IO.Encoding.Failure ( CodingFailureMode(..) )

import System.OsString.Internal.Types
Expand Down
10 changes: 9 additions & 1 deletion filepath.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,16 @@ library
, bytestring >=0.11.3.0
, deepseq
, exceptions
, template-haskell
, os-string >=2.0.1
-- template-haskell-lift was added as a boot library in GHC-9.14
-- once we no longer wish to backport releases to older major releases,
-- this conditional can be dropped
if impl(ghc < 9.14)
build-depends: template-haskell
elif impl(ghc)
build-depends:
, template-haskell-lift >=0.1 && <0.2
, template-haskell-quasiquoter >=0.1 && <0.2

ghc-options: -Wall

Expand Down
Loading