ghc-lib-parser-9.2.1.20220109: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Driver.Phases

Synopsis

Documentation

data Phase Source #

Instances

Instances details
Eq Phase Source # 
Instance details

Defined in GHC.Driver.Phases

Methods

(==) :: Phase -> Phase -> Bool #

(/=) :: Phase -> Phase -> Bool #

Show Phase Source # 
Instance details

Defined in GHC.Driver.Phases

Methods

showsPrec :: Int -> Phase -> ShowS #

show :: Phase -> String #

showList :: [Phase] -> ShowS #

Outputable Phase Source # 
Instance details

Defined in GHC.Driver.Phases

Methods

ppr :: Phase -> SDoc Source #

isHaskellishTarget :: (String, Maybe Phase) -> Bool Source #

When we are given files (modified by -x arguments) we need to determine if they are Haskellish or not to figure out how we should try to compile it. The rules are:

  1. If no -x flag was specified, we check to see if the file looks like a module name, has no extension, or has a Haskell source extension.
  2. If an -x flag was specified, we just make sure the specified suffix is a Haskell one.

phaseForeignLanguage :: Phase -> Maybe ForeignSrcLang Source #

Foreign language of the phase if the phase deals with a foreign code