Skip to content

Commit d941324

Browse files
committed
Also enable and test MagicHash
1 parent a62dd95 commit d941324

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

example/package-a/app/Main.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{-# LANGUAGE CPP #-}
22
{-# LANGUAGE PatternSynonyms #-}
33
{-# LANGUAGE ExplicitNamespaces #-}
4+
{-# LANGUAGE MagicHash #-}
45
module Main where
56

67
#define a_multiline macro \
78
a second line of the macro
89
import NonModulesLib (nonModulesLib)
910
import PackageA.Other.C(type DataC, DataC(DataC), pattern PatTrue)
11+
import GHC.Exts (Int(..), Int#)
1012

1113
main :: IO ()
1214
main = do
1315
let
1416
dataC :: DataC
1517
dataC = DataC PatTrue
16-
putStrLn $ "Hello, Haskell! " ++ show nonModulesLib ++ show dataC
18+
int# :: Int#
19+
int# = case 1 of I# i -> i
20+
putStrLn $ "Hello, Haskell! " ++ show nonModulesLib ++ show dataC ++ show (I# int#)

himportscan/src/HImportScan/GHC.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import GHC.LanguageExtensions as X
1414
, ImplicitPrelude
1515
, PatternSynonyms
1616
, ExplicitNamespaces
17+
, MagicHash
1718
)
1819
)
1920
import HeaderInfo as X (getOptions, getImports)

himportscan/src/HImportScan/ImportScanner.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ toggleDynFlags dflags0 =
128128
, GHC.TemplateHaskell
129129
, GHC.PatternSynonyms
130130
, GHC.ExplicitNamespaces
131+
, GHC.MagicHash
131132
]
132133
in GHC.xopt_unset dflags1 GHC.ImplicitPrelude
133134

0 commit comments

Comments
 (0)