ghc-8.6.5: The GHC API

Safe HaskellNone
LanguageHaskell2010

DriverPhases

Synopsis

Documentation

data HscSource #

Constructors

HsSrcFile 
HsBootFile 
HsigFile 
Instances
Eq HscSource # 
Instance details

Defined in DriverPhases

Ord HscSource # 
Instance details

Defined in DriverPhases

Show HscSource # 
Instance details

Defined in DriverPhases

Binary HscSource # 
Instance details

Defined in DriverPhases

data Phase #

Instances
Eq Phase # 
Instance details

Defined in DriverPhases

Methods

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

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

Show Phase # 
Instance details

Defined in DriverPhases

Outputable Phase # 
Instance details

Defined in DriverPhases

Methods

ppr :: Phase -> SDoc #

pprPrec :: Rational -> Phase -> SDoc #

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

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.