GHC.Types.SourceFile

ghc-9.2.4: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Types.SourceFile

Synopsis

- data HscSource
  - = HsSrcFile
  - | HsBootFile
  - | HsigFile
- data SourceModified
  - = SourceModified
  - | SourceUnmodified
  - | SourceUnmodifiedAndStable
- isHsBootOrSig :: HscSource -> Bool
- isHsigFile :: HscSource -> Bool
- hscSourceString :: HscSource -> String

# Documentation

data HscSource Source #

Constructors

HsSrcFile | .hs file
HsBootFile | .hs-boot file
HsigFile | .hsig file

#### Instances

Instances details

Show HscSource Source # |
Instance details Defined in GHC.Types.SourceFile Methods showsPrec :: Int -> HscSource -> ShowS Source # show :: HscSource -> String Source # showList :: [HscSource] -> ShowS Source #
Binary HscSource Source # |
Instance details Defined in GHC.Types.SourceFile Methods put_ :: BinHandle -> HscSource -> IO () Source # put :: BinHandle -> HscSource -> IO (Bin HscSource) Source # get :: BinHandle -> IO HscSource Source #
Eq HscSource Source # |
Instance details Defined in GHC.Types.SourceFile Methods (==) :: HscSource -> HscSource -> Bool # (/=) :: HscSource -> HscSource -> Bool #
Ord HscSource Source # |
Instance details Defined in GHC.Types.SourceFile Methods compare :: HscSource -> HscSource -> Ordering # (<) :: HscSource -> HscSource -> Bool # (<=) :: HscSource -> HscSource -> Bool # (>) :: HscSource -> HscSource -> Bool # (>=) :: HscSource -> HscSource -> Bool # max :: HscSource -> HscSource -> HscSource # min :: HscSource -> HscSource -> HscSource #

data SourceModified Source #

Indicates whether a given module's source has been modified since it was last compiled.

Constructors

SourceModified | the source has been modified
SourceUnmodified | the source has not been modified. Compilation may or may not be necessary, depending on whether any dependencies have changed since we last compiled.
SourceUnmodifiedAndStable | the source has not been modified, and furthermore all of its (transitive) dependencies are up to date; it definitely does not need to be recompiled. This is important for two reasons: (a) we can omit the version check in checkOldIface, and (b) if the module used TH splices we don't need to force recompilation.

isHsBootOrSig :: HscSource -> Bool Source #

isHsigFile :: HscSource -> Bool Source #

hscSourceString :: HscSource -> String Source #