|Notes, i.e., warnings, errors, etc.
Scion's type for source code locations (regions).
We use a custom location type for two reasons:
1. We enforce the invariant, that the file path of the location is an
2. Independent evolution from the GHC API.
To save space, the Location type is kept abstract and uses special
cases for notes that span only one line or are only one character wide.
Use mkLocation and viewLoc as well as the respective accessor
functions to construct and destruct nodes.
If no reasonable can be given, use the mkNoLoc function, but be careful
not to call viewLoc or any other accessor function on such a
|The "source" of a location.
|FileSrc AbsFilePath||The location refers to a position in a file.
|OtherSrc String||The location refers to something else, e.g., the command line, or
|-> Int||start line
|-> Int||start column
|-> Int||end line
|-> Int||end column
Construct a source code location from start and end point.
If the start point is after the end point, they are swapped
|Construct a source location that does not specify a region. The
argument can be used to give some hint as to why there is no location
available. (E.g., "File not found").
|Test whether a location is valid, i.e., not constructed with mkNoLoc.
|-> (LocSource, Int, Int, Int, Int)||source, start line, start column, end line, end column.
View on a (valid) location.
It holds the property:
prop_viewLoc_mkLoc s l0 c0 l1 c1 =
viewLoc (mkLocation s l0 c0 l1 c1) == (s, l0, c0, l1, c1)
|Return the start column. Only defined on valid locations.
|Return the end column. Only defined on valid locations.
|Return the start line. Only defined on valid locations.
|Return the end line. Only defined on valid locations.
Represents a FilePath which we know is absolute.
Since relative FilePaths depend on the a current working directory we
normalise all paths to absolute paths. Use mkAbsFilePath to create
absolute file paths.
|:: FilePath||base directory (must be absolute)
|-> FilePath||absolute or relative
Create an absolute file path given a base directory.
Throws an error if the first argument is not an absolute path.
|A note from the compiler or some other tool.
|Classifies the kind (or severity) of a note.
|Produced by Haddock version 2.4.2|