[th] fix for file-embed which didn't work when this lib was used as a dependency

parent caca8bce
Pipeline #6740 passed with stages
in 16 minutes and 14 seconds
...@@ -5,9 +5,4 @@ with-compiler: ghc-9.4.7 ...@@ -5,9 +5,4 @@ with-compiler: ghc-9.4.7
packages: packages:
./ ./
source-repository-package
type: git
location: https://github.com/snoyberg/file-embed/
tag: 001cdedeacad9f38c24f2439c6b9c43c46363cc9
tests: true tests: true
...@@ -77,10 +77,11 @@ library ...@@ -77,10 +77,11 @@ library
build-depends: base ^>=4.17.2.0 build-depends: base ^>=4.17.2.0
, aeson >= 1.4 && < 2.3 , aeson >= 1.4 && < 2.3
, bytestring >= 0.11 && < 0.13 , bytestring >= 0.11 && < 0.13
, file-embed >= 0.0.16 && < 0.1
, postgresql-simple >= 0.6 && < 0.8 , postgresql-simple >= 0.6 && < 0.8
, safe >= 0.3 && < 0.4 , safe >= 0.3 && < 0.4
, template-haskell >= 2.19.0.0 && < 2.20
, text >= 1.2 && < 2.2 , text >= 1.2 && < 2.2
, th-utilities >= 0.2.5.0 && < 0.3
, time >= 1.10 && < 1.15 , time >= 1.10 && < 1.15
, units >= 2.4 && < 2.5 , units >= 2.4 && < 2.5
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
module Database.PGMQ.Schema where module Database.PGMQ.Schema where
import Data.FileEmbed (embedFileRelative) import Language.Haskell.TH.Syntax (lift)
import Data.Text qualified as T import TH.RelativePaths (qReadFileString)
import Data.Text.Encoding qualified as T
pgmqSchema :: String pgmqSchema :: String
pgmqSchema = T.unpack . T.decodeUtf8 $ $(embedFileRelative "sql/pgmq.sql") pgmqSchema = $(qReadFileString "sql/pgmq.sql" >>= lift)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment