1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-22 19:09:43 +01:00

Support Cabal 3.

hsSourceDirs is now a list of SymbolicPath instead of FilePath.
This commit is contained in:
Mike Sperber 2023-02-16 13:38:54 +01:00 committed by fkm3
parent dad19fde31
commit 555d90c432

View file

@ -28,6 +28,9 @@ import Distribution.Simple
, simpleUserHooks
, UserHooks(..)
)
#if MIN_VERSION_Cabal(3,1,0)
import Distribution.Utils.Path (unsafeMakeSymbolicPath)
#endif
import Data.List (intercalate)
import Data.ProtoLens (decodeMessage)
import System.Directory (createDirectoryIfMissing)
@ -81,7 +84,11 @@ fudgePackageDesc lbi p = p
}
where
fudgeBuildInfo bi =
#if MIN_VERSION_Cabal(3,1,0)
bi { hsSourceDirs = unsafeMakeSymbolicPath (autogenModulesDir lbi) : hsSourceDirs bi }
#else
bi { hsSourceDirs = autogenModulesDir lbi : hsSourceDirs bi }
#endif
blackList =
[ -- Requires the "func" type: