ghc-9.2.5: The GHC API

GHC.Unit.Module.Location

Description

Module location

Synopsis

# Documentation

Module Location

Where a module lives on the file system: the actual locations of the .hs, .hi and .o files, if we have them.

For a module in another unit, the ml_hs_file and ml_obj_file components of ModLocation are undefined.

The locations specified by a ModLocation may or may not correspond to actual files yet: for example, even if the object file doesn't exist, the ModLocation still contains the path to where the object file will reside if/when it is created.

Constructors

 ModLocation Fieldsml_hs_file :: Maybe FilePathThe source file, if we have one. Package modules probably don't have source files.ml_hi_file :: FilePathWhere the .hi file is, whether or not it exists yet. Always of form foo.hi, even if there is an hi-boot file (we add the -boot suffix later)ml_obj_file :: FilePathWhere the .o file is, whether or not it exists yet. (might not exist either because the module hasn't been compiled yet, or because it is part of a unit with a .a file)ml_hie_file :: FilePathWhere the .hie file is, whether or not it exists yet.

#### Instances

Instances details
 Source # Instance detailsDefined in GHC.Unit.Module.Location MethodsshowList :: [ModLocation] -> ShowS Source # Source # Instance detailsDefined in GHC.Unit.Module.Location Methods

Add the -boot suffix to .hs, .hi and .o files

Add the -boot suffix if the Bool argument is True

Add the -boot suffix to all file paths associated with the module

Add the -boot suffix to all output file paths associated with the module, not including the input file itself

Remove the -boot suffix to .hs, .hi and .o files