Module

Psa.Output

#output

output :: forall m. Monad m => (Filename -> Position -> m (Maybe Lines)) -> PsaOptions -> PsaResult -> m Output

Annotates a error/warning result set with original source lines, better positions, and semantic paths (lib vs src). The callback should load the requested set of lines from the absolute filename based on the tentative position information.

#Output

type Output = { errors :: Array PsaAnnotedError, stats :: OutputStats, warnings :: Array PsaAnnotedError }

#OutputStats

type OutputStats = { allErrors :: Object (Tuple Int Int), allWarnings :: Object (Tuple Int Int), libErrors :: Object (Tuple Int Int), libWarnings :: Object (Tuple Int Int), srcErrors :: Object (Tuple Int Int), srcWarnings :: Object (Tuple Int Int) }

Statistics are a ratio of errors shown to errors in total.

#trimPosition

trimPosition :: Lines -> Position -> Position

Finds the true bounds of the source. The PureScript compiler is greedy when it comes to matching whitespace at the end of an expression, so the original source bounds always includes whitespace and comments.

#trimMessage

trimMessage :: String -> String

Trims extraneous whitespace from psc error messages.

Modules