A compilation target.
A target may be supplied with the actual text of the module. If so, use this instead of the file contents (this is for use in an IDE where the file hasn't been saved by the user yet).
These fields are strict because Targets are long lived.
Constructors
TargettargetId :: !TargetIdmodule or filename
targetAllowObjCode :: !Boolobject code allowed?
targetUnitId :: !UnitIdid of the unit this target is part of
targetContents :: !Maybe (InputFileBuffer, UTCTime)Optional in-memory buffer containing the source code GHC should use for this target instead of reading it from disk.
Since GHC version 8.10 modules which require preprocessors such as Literate Haskell or CPP to run are also supported.
If a corresponding source file does not exist on disk this will result in a
SourceErrorexception iftargetId = TargetModule _is used. However together withtargetId = TargetFile _GHC will not complain about the file missing.
Instances1Outputable
Outputable TargetDefined in ghc-9.10.3 · GHC.Types.Target