Skip to content

Commit 67f2ee6

Browse files
committed
stop using deprecated Turtle.fromText
1 parent 45dc726 commit 67f2ee6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

misc/build_artifacts.hs

+11
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import Turtle
77
import qualified Control.Foldl as L
88
import Control.Monad
9+
#if MIN_VERSION_turtle(1,6,0)
10+
import qualified Data.Text as T
11+
#endif
912
import Distribution.Package
1013
import Distribution.PackageDescription
1114
import Distribution.PackageDescription.Parsec
@@ -58,12 +61,20 @@ main = sh $ do
5861
when b $ rmtree pkg
5962

6063
mktree (pkg </> "bin")
64+
#if MIN_VERSION_turtle(1,6,0)
65+
let binDir = T.unpack (lineToText local_install_root) </> "bin"
66+
#else
6167
let binDir = fromText (lineToText local_install_root) </> "bin"
68+
#endif
6269
forM exe_files $ \name -> do
6370
cp (binDir </> addExeSuffix name) (pkg </> "bin" </> addExeSuffix name)
6471

6572
mktree (pkg </> "lib")
73+
#if MIN_VERSION_turtle(1,6,0)
74+
let libDir = T.unpack (lineToText local_install_root) </> "lib"
75+
#else
6676
let libDir = fromText (lineToText local_install_root) </> "lib"
77+
#endif
6778
when (Info.os == "mingw32") $ do
6879
cp (libDir </> "toysat-ipasir.dll") (pkg </> "bin" </> "toysat-ipasir.dll")
6980
proc "stack"

0 commit comments

Comments
 (0)