From 700922a394397ff155897a673b43139cd691c70e Mon Sep 17 00:00:00 2001 From: Janus Troelsen Date: Mon, 16 Dec 2024 11:48:21 -0600 Subject: [PATCH] Fix cross-compilation (exclude TH) --- dhall/dhall.cabal | 6 +++++- dhall/tests/Dhall/Test/Main.hs | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dhall/dhall.cabal b/dhall/dhall.cabal index 39ba80687..e0b7ad1f7 100644 --- a/dhall/dhall.cabal +++ b/dhall/dhall.cabal @@ -268,6 +268,8 @@ Common common if flag(network-tests) CPP-Options: -DNETWORK_TESTS + if flag(cross) + CPP-Options: -DCROSS GHC-Options: -Wall -Wcompat -Wincomplete-uni-patterns -optP-Wno-unicode-homoglyph @@ -432,10 +434,12 @@ Test-Suite tasty Dhall.Test.Schemas Dhall.Test.SemanticHash Dhall.Test.Substitution - Dhall.Test.TH Dhall.Test.Tutorial Dhall.Test.TypeInference Dhall.Test.Util + if !flag(cross) + Other-Modules: + Dhall.Test.TH Build-Depends: dhall , foldl < 1.5 , diff --git a/dhall/tests/Dhall/Test/Main.hs b/dhall/tests/Dhall/Test/Main.hs index 5e4ac206f..ee8b6c822 100644 --- a/dhall/tests/Dhall/Test/Main.hs +++ b/dhall/tests/Dhall/Test/Main.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} module Main where import System.FilePath (()) @@ -17,7 +18,9 @@ import qualified Dhall.Test.QuickCheck import qualified Dhall.Test.Regression import qualified Dhall.Test.Schemas import qualified Dhall.Test.SemanticHash +#ifndef CROSS import qualified Dhall.Test.TH +#endif import qualified Dhall.Test.Tags import qualified Dhall.Test.Tutorial import qualified Dhall.Test.TypeInference @@ -69,7 +72,9 @@ getAllTests = do , Dhall.Test.Tutorial.tests , Dhall.Test.QuickCheck.tests , Dhall.Test.Dhall.tests +#ifndef CROSS , Dhall.Test.TH.tests +#endif , Dhall.Test.Package.tests ]