Skip to content

Commit 4f185b9

Browse files
Fix cross-compilation (exclude TH) (#2621)
Co-authored-by: gabby <GenuineGabriella@gmail.com>
1 parent e9f37ae commit 4f185b9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

dhall/dhall.cabal

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ Common common
268268
if flag(network-tests)
269269
CPP-Options:
270270
-DNETWORK_TESTS
271+
if flag(cross)
272+
CPP-Options: -DCROSS
271273

272274
GHC-Options: -Wall -Wcompat -Wincomplete-uni-patterns -optP-Wno-unicode-homoglyph
273275

@@ -432,10 +434,12 @@ Test-Suite tasty
432434
Dhall.Test.Schemas
433435
Dhall.Test.SemanticHash
434436
Dhall.Test.Substitution
435-
Dhall.Test.TH
436437
Dhall.Test.Tutorial
437438
Dhall.Test.TypeInference
438439
Dhall.Test.Util
440+
if !flag(cross)
441+
Other-Modules:
442+
Dhall.Test.TH
439443
Build-Depends:
440444
dhall ,
441445
foldl < 1.5 ,

dhall/tests/Dhall/Test/Main.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
module Main where
23

34
import System.FilePath ((</>))
@@ -17,7 +18,9 @@ import qualified Dhall.Test.QuickCheck
1718
import qualified Dhall.Test.Regression
1819
import qualified Dhall.Test.Schemas
1920
import qualified Dhall.Test.SemanticHash
21+
#ifndef CROSS
2022
import qualified Dhall.Test.TH
23+
#endif
2124
import qualified Dhall.Test.Tags
2225
import qualified Dhall.Test.Tutorial
2326
import qualified Dhall.Test.TypeInference
@@ -69,7 +72,9 @@ getAllTests = do
6972
, Dhall.Test.Tutorial.tests
7073
, Dhall.Test.QuickCheck.tests
7174
, Dhall.Test.Dhall.tests
75+
#ifndef CROSS
7276
, Dhall.Test.TH.tests
77+
#endif
7378
, Dhall.Test.Package.tests
7479
]
7580

0 commit comments

Comments
 (0)