Matthew Pickering pushed to branch wip/splice-imports-2025 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • compiler/Language/Haskell/Syntax/ImpExp/ImportLevel.hs
    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
    +

  • compiler/Language/Haskell/Syntax/ImpExp/IsBoot.hs
    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