futhark-0.25.19: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageGHC2021

Language.Futhark.Warnings

Description

A very simple representation of collections of warnings. Warnings have a position (so they can be ordered), and their Pretty-instance produces a human-readable string.

Synopsis

Documentation

data Warnings Source #

The warnings produced by the compiler. The Show instance produces a human-readable description.

Instances

Instances details
Monoid Warnings Source # 
Instance details

Defined in Language.Futhark.Warnings

Semigroup Warnings Source # 
Instance details

Defined in Language.Futhark.Warnings

anyWarnings :: Warnings -> Bool Source #

True if there are any warnings in the set.

singleWarning :: Loc -> Doc () -> Warnings Source #

A single warning at the given location.

singleWarning' :: Loc -> [Loc] -> Doc () -> Warnings Source #

A single warning at the given location, but also with a stack trace (sort of) to the location.

listWarnings :: Warnings -> [(Loc, Doc ())] Source #

Exports Warnings into a list of (location, problem).

prettyWarnings :: Warnings -> Doc AnsiStyle Source #

Prettyprint warnings, making use of colours and such.