Matthew Pickering pushed to branch wip/splice-imports-2025 at Glasgow Haskell Compiler / GHC
Commits:
-
109a58bf
by Matthew Pickering at 2025-04-16T19:21:28+01:00
2 changed files:
- + compiler/Language/Haskell/Syntax/ImpExp/ImportLevel.hs
- + compiler/Language/Haskell/Syntax/ImpExp/IsBoot.hs
Changes:
1 | +-- | A module to define 'ImportLevel' so it can be given an Outputable instance
|
|
2 | +-- without introducing module loops.
|
|
3 | +module Language.Haskell.Syntax.ImpExp.ImportLevel ( ImportLevel(..) ) where
|
|
4 | + |
|
5 | + |
|
6 | +import Prelude (Eq, Ord, Show, Enum)
|
|
7 | +import Data.Data (Data)
|
|
8 | + |
|
9 | +data ImportLevel = NormalLevel | SpliceLevel | QuoteLevel deriving (Eq, Ord, Data, Show, Enum)
|
|
10 | + |
1 | +module Language.Haskell.Syntax.ImpExp.IsBoot ( IsBootInterface(..) ) where
|
|
2 | + |
|
3 | +import Prelude (Eq, Ord, Show)
|
|
4 | +import Data.Data (Data)
|
|
5 | +import Control.DeepSeq (NFData(..), rwhnf)
|
|
6 | + |
|
7 | +-- | Indicates whether a module name is referring to a boot interface (hs-boot
|
|
8 | +-- file) or regular module (hs file). We need to treat boot modules specially
|
|
9 | +-- when building compilation graphs, since they break cycles. Regular source
|
|
10 | +-- files and signature files are treated equivalently.
|
|
11 | +data IsBootInterface = NotBoot | IsBoot
|
|
12 | + deriving (Eq, Ord, Show, Data)
|
|
13 | + |
|
14 | +instance NFData IsBootInterface where
|
|
15 | + rnf = rwhnf |
|
\ No newline at end of file |